Blinking LED With an Potentiometer
by achoi9415 in Circuits > Arduino
42 Views, 0 Favorites, 0 Comments
Blinking LED With an Potentiometer
An LED with an potentiometer. Taught by Mr. Sweet in mechatronics class, used Ardunio IDE example code, and used sparkfun guidebook.
Supplies
- 1 LED
- 1 ardunio
- 1 potentiometer
- 6 wires
- 1 breadboard
Setting Up
- connect ground to negative
- connect 5v to positive
- add an potentiometer on the breadboard
- connect the right led of the potentiometer to the negative
- connect the middle led of the potentiometer to A0
- connect the left led of the potentiometer to positive
- add the LED and connect the positive led of the LED to #12 on the ardunio
- add a resistor to the negative led connecting the LED to the negative
Coding
- open ardunio IDE and code the script seen in the image
Testing
- upload the code
- connect the ardunio to the breadboard
- test if it works