How can I stop for loop by a comand
hi everybody..
i played different ways still did right.... how hall can stop for loop command?
i can start loop command no problem... can use serial.peek. serial.read()=='1'
but need , can not interrupt , stop loop command. do???
this code doesn't work. mean loop running untill 10 need stop on 4 or 5 command
i played different ways still did right.... how hall can stop for loop command?
i can start loop command no problem... can use serial.peek. serial.read()=='1'
but need , can not interrupt , stop loop command. do???
this code doesn't work. mean loop running untill 10 need stop on 4 or 5 command
code: [select]
while(serial2.available()>0)
{
char ch = serial2.read();
int j=0;
if(ch == '1')
{
for(j; j<10; j++)
{
serial1.println("atz");
delay(3000);
if(serial1.available()>0)
{
getresponse();
serial2.println(str);
serial2.println(str.length());
}
}
}
else if(ch == '0')
{
j=10;
delay(100);
}
}
}
code: [select]
break;
Arduino Forum > Using Arduino > Programming Questions > How can I stop for loop by a comand
arduino
Comments
Post a Comment