https://www.jeremyblum.com/2011/02/07/arduino-tutorial-6-serial-communication-and-processing/
Tutorial 6 for Arduino: Serial Comm and Processing