Hi all guys, i've a problem that i'm trying to resolve by about one hour of coding (the beginner's luck eheh).
I simply want to set ON typing in 'a' and to set it OFF typing another time 'a' but it doesn't function and i don't know the why =(
(i'm using Serial.read like a scanf in C)
Loop runs very quickly, and Serial.read() doesn't stop and wait until there is something in the buffer, so you're leaving it up to change as to which Serial.read actually pulls the character out. Rarely, should there be more than one serial read per UART in a given sketch, this isn't one of those times.