We will begin our Arduino connection by creating a simple circuit. This circuit will use a small potentiometer for input, and four LEDs for visual output. The parts necessary for this circuit include:
- An Arduino board (we will be using an Arduino Uno)
- A small breadboard
- A variety of jumper wires
- Four (4) LEDs of any color
- Five (5) 1K resistors
- One breadboard-mounting potentiometer
Using these parts, create the following circuit layout:
(You can download the Fritzing file here)
A few notes about this circuit:
- You will be plugging the Arduino into the computer for serial communication with the computer (and Max). Most Arduino boards have a USB port that provides power to the device. We tap into that power for the simple circuit we've created.
- We use digital pins 2 - 5 for our LED display. You generally don't want to use pins 0 and 1, since they are used for serial communication.
- In order to prevent overtaxing the power supply of the Arduino, use use the 1K resistors as "current limiting resistors" - they reduce the amount of current drawn from the Arduino board.
Now that we have a circuit ready, let's create an Arduino sketch that tests our board, and prepares it for communication with Max.
<Previous: Introduction> <Next: The Arduino sketch>