Hi
I am working on a project that includes an Arduino Uno reading some temperature sensors and passing the data to my pc thru serial communication.
If I understood correctly, the "serialEvent" function interrupts the program and is activated when there is some data to read in the receive serial bus.
so if what I said is correct... my question is why in all the examples I saw that use the "serialEvent" function, the first code line inside the function is the next while loop:
while(Serial.available()){
}
isn't it doing the same thing? because Serial.available() returns the number of bytes there are to read from the receive serial bus?
thanks