servo motor control


hello, doing project using 2 servo motors moving , down in while loop

i making 3 different limits in 3 while loops

while(var=='3')
{
micro1.write(80);
micro2.write(80);
delay(1000);
micro1.write(45);
micro2.write(45);
delay(1000);
serial.write('base displaced 10 mm');

while(var=='2')
{
micro1.write(100);
micro2.write(100);
delay(1000);
micro1.write(45);
micro2.write(45);
delay(1000);
serial.write('base displaced 20 mm');

these example

i choose limits through serial monitor

the issue want switch between variables while servo motors working can't break out while loop new 1

i appreciate issue thank


but can't break out while loop new 1
don't use while. use if , allow loop() repetition.

have @ code in several things @ time

...r


Arduino Forum > Using Arduino > Programming Questions > servo motor control


arduino

Comments

Popular posts from this blog

Flip address is out of range arduino uno r3

Arduino Uno not uploading

Indesign and MathType fonts