Connecting your Arduino
Say hello to your Arduino. The first task of our current mission is to write a sketch that runs on Arduino and reads the value of a variable resistor. Since this is a book about Processing, we are going to write a Processing sketch that receives the resistor values from our Arduino board and prints the value.
Prepare for Lift Off
In this task, we are going to write code that runs on Arduino, so we need the Arduino IDE installed. You can download it from www.arduino.cc and install it by unzipping the package that matches your operating system.
Engage Thrusters
Let's hook up our Arduino:
The first thing we need to do for this task is to build a little circuit, so take one of your variable resistors and hook it up to the solderless breadboard like in the following diagram:
Now connect a red wire from the 5V pin of your Arduino board to one of the outer leads of our resistor.
The middle pin of the resistor gets connected to the pin labeled ANALOG IN 0 on your Arduino board.
Connect...