Wire it on a real board
Using only the on-screen board? You can skip this step.
This lesson needs a few wires. The LED and a resistor go in series, from pin 9 to GND10.
Wire the LED
- Join pin 9 to one end of the resistor10.
- Join the other end of the resistor to the LED’s long leg10.
- Join the LED’s short leg to GND10.
Arduino’s own example uses a 220 ohm resistor, to limit the current10. The UNO R3’s specs list 20 mA of current per pin5.
Wire the knob
Wire the knob as in Lesson 2. Its outer pins go to 5V and GND, and its middle pin goes to A010.
Send the sketch to the board
Copy the sketch from step 2. Then upload it the same way as in Lesson 1, step 3. Turn the knob, and the LED gets brighter or dimmer.
Not working? Start with the Stuck? checklist.
Sources for this page
- Arduino UNO R3 technical specifications: Clock speed: ATmega328P 16 MHz; DC Current per I/O Pin: 20 mA
- Arduino tutorial: Analog In, Out Serial: knob on A0; LED and 220 ohm resistor in series on pin 9