Category Archives: Arduino

Arduino + Processing

Sparkfun has an excellent tutorial on the process of getting communication going between Arduino and┬áProcessing. It’s a bit word-heavy for my taste, so here’s a condensed version that my students are using this semester. All that’s required is an Arduino, a 10K resistor, a photoresistor, and some wire. See the comments at the top of the Arduino sketch below for a simplified wiring diagram. Note: this code only works one way (Arduino > Processing).

Arduino

Processing

First you should run this short program to find which port the Arduino is communicating on:

Now edit the following program with the port (around line 13) and run it. Don’t forget to plug in your circuit and to close the serial monitor in Arduino if it’s currently running.