Analog Input/Output

Potentiometer values are read in through an 'Analog In' pin. The values are then used to control the modulation of an LED on a PWM pin.

Use a 1kΩ potentiometer, an LED and a 220Ω resistor. Connect three wires from the Potentiometer to the Arduino board. The first goes to ground from one of the outer pins of the potentiometer. The second goes from 5 volts to the other outer pin of the potentiometer. The third goes from analog input 2 to the middle pin of the potentiometer. Connect the LED through a resistor to a PWM pin and ground.

By omer
Created on March 23, 2009, 11:39

Category: Analog

Difficulty: kids

License:  Creative Commons Attribution-Share Alike 3.0 Unported License

Tags: analog, input, output, potentiometer, pwm

Images

Files

Links

Comments

  1. santiagorulo # June 9, 2010, 9:50 p.m.

    Hello, could you help me with my proyect, I want to turn on the led from precessing, for example with pushing on the arrows on the keyboard or sending a note via midi. Thanks

Login to post a comment...
  • Print this
© 2007 - 2011 University of Applied Sciences Potsdam