Step 1: Create an Arduino-based Circuit
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) 330 ohm resistors
- One breadboard-mounting potentiometer
Using these parts, create the following circuit layout:
(You can download the Fritzing file here: Media:SimpleArduinoConnection-02fzz.zip)
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 330 ohm resistors as "current limiting resistors" - they reduce the amount of current drawn from the Arduino board, and prevent the LEDs from burning out.
You can see a picture of my circuit board creation on the Introduction page.
Now that we have our circuit ready, let's create an Arduino sketch that tests our board, and prepares it for communication with Max.