So ive got this light sensor (PPF) and it uses a serial communication protocol to send the value of data to the arduino. Im looking at making a little LCD screen and placing it somewhere where i can read the output without having to check a serial monitor on my computer.
The sensor recieves the term "measure" of which it then returns the value as a series of numbers ( e.g 12.1256)
how can i make the code wait (without using a delay which seems very primative) until all the numbers have been sent before sending the 'measure' term again. (p.s i dont know exactly how many terms the light value will be)
"how can i make the code wait (without using a delay which seems very primative) until all the numbers have been sent before sending the 'measure' term again. (p.s i dont know exactly how many terms the light value will be)"
A delay might be ok, it just depends what else is going on in your program. A 3ms delay between reading of the serial input buffer for new characters seems to work at 9600 baud.