Hey all!
I got a noob question about multiple inputs through the serial monitor.
The first input I want is to decide between char '1' and char '2'.
When I press '1', I want a second input to write some data into array1 for example.
When I press '2', I want a third input to write some data into array2.
So basically I need one input to choose the next input.
The first input is:
void loop()
{
if (Serial.available())
{
inputChar = Serial.read();
if (inputChar == '1') {
...code to write into array1....;
}
else if (inputChar == '2') {
...code to write into array2....;
}
else {
Serial.println("invalid entry");
}
}
And my question is, how do I write the second/third input into this code?
Thanks