I have serial comms working over bluetooth and can get a variable to react, which is nice:
void loop(){
/*Bluetooth stuff*/
if (Serial.available()) {
;
}
serialInput=Serial.read();//send what has been received
if (serialInput == 's') {
--- rest of if statement here ---
What I'd like to do is have the comms as a 2 stage process, receiving var1,var2 first then reacting when I receive 's' as per the above. Var1 and var2 can be single characters and set control variables.
Does anybody have a sample of how I should do this?
Thanks...