Hello,
i'm a complete noob in coding.
I write because i didn't find an particular answer to my my problem.
Question:
My task is to "tell" to each of two ports to flash the its LED, as many times in an input.
I built a code in which i i'm "telling" it to stop running until i input the first value
and then stop running until i enter the second value.
The problem is that it accepts the first input and ignores the second one and starts running the code that comes after.
the code works fine with the delay() command.
I would very much appreciate the answer.
The code piece*:
*while the whole code is attached only the relevant piece follows.
Serial.println("#times for blue led to blink: ");
while (Serial.available() == 0 ){}
BlueLedBlinkTimes=Serial.parseInt();
Serial.println("#times for green led to blink: ");
while (Serial.available() == 0 ){}
GreenLedBlinkTimes=Serial.parseInt();
analogInput.ino (1.05 KB)