Tutorial: Serial Communication

These are notes I took for myself, that helped me understand and remember how to implement Serial communication in my code.
Serial communication can be very important for troubleshooting, to see what bits of the code are working properly and which aren’t. It can also necessary for extra functions like for example communication data to processing. The usual communication speed is 9600 Baud.

Remember that for example “Serial.print(“buttonState”)” will make it print the word “buttonState”, while “Serial.print (buttonState) will make it print the actual number this variable is representing, so in this case “1″ or “0″.

The last of your Serial.print() statements should usually be Serial.println(), which makes it skip tothe next line after prnting

IMG_4829 Neu

Leave a Reply