Project 7: Control the Flashing Rate of an LED using a Potentiometer (AnalogInput)

Created on: 2 August 2012

Tutorial 10 – Pages

The analog value on the Arduino analog pin A0 is changed using a potentiometer. The value read on this pin by the Arduino is used to change the rate at which the on-board LED flashes.

Parts Needed

1 × 10k potentiometer

Amazon.com

Amazon.co.uk


Arduino Website Page

AnalogInput

In the Arduino IDE

File → Examples → 3.Analog → AnalogInput

Building the Circuit

Connect the potentiometer as shown on the Arduino website AnalogInput page.

Programming and Operating the Circuit

Open the sketch in the Arduino IDE (File → Examples → 3.Analog → AnalogInput) and then upload it to the Arduino board.

As the shaft of the potentiometer is rotated, the rate at which the Arduino on board "L" LED flashes will change.

Project 7 Video


Can't see the video? View on YouTube →

← Go back to P6: AnalogInOutSerialGo to P8: Calibration →