Blinking LED With an Potentiometer

by achoi9415 in Circuits > Arduino

42 Views, 0 Favorites, 0 Comments

Blinking LED With an Potentiometer

IMG_7779.png

An LED with an potentiometer. Taught by Mr. Sweet in mechatronics class, used Ardunio IDE example code, and used sparkfun guidebook.

Supplies

IMG_7777.png
  1. 1 LED
  2. 1 ardunio
  3. 1 potentiometer
  4. 6 wires
  5. 1 breadboard

Setting Up

Blinking LED with potentiometer tinkerCAD.PNG
IMG_7778.png
  1. connect ground to negative
  2. connect 5v to positive
  3. add an potentiometer on the breadboard
  4. connect the right led of the potentiometer to the negative
  5. connect the middle led of the potentiometer to A0
  6. connect the left led of the potentiometer to positive
  7. add the LED and connect the positive led of the LED to #12 on the ardunio
  8. add a resistor to the negative led connecting the LED to the negative

Coding

Blinking LED with potentiometer.PNG
  1. open ardunio IDE and code the script seen in the image

Testing

IMG_7779.png
  1. upload the code
  2. connect the ardunio to the breadboard
  3. test if it works