Introduction: Arduino Mini Spotlight
This is a mini led spotlight that I made which can be controlled by a potentiometer.
Step 1: Materials
You will need:
Arduino Uno Rev 3
Radioshack Standard Servo
Potentiometer(I used a 10k)
6v Battery Pack
Small led Flashlight
Step 2: Attach the Potentiometer
The first step is pretty simple just attach the potentiometer as shown in the picture.
Step 3: Attaching the Servo
Attach the servo as shown in this picture.
Step 4: Attaching the Battery Pack
Attach the battery pack as shown in this picture.
Step 5: The Led Light
For this next step you can attach the led by wrapping it around the servo horn.
Step 6: CODE!!!
The code for this project is pretty simple just copy and paste this program right here and upload it into the arduino:
int potPin = 2;
pos = analogRead(potPin);
pos = map(pos, 0, 1023, 0, 179);
Step 7: Your Done
If you made it to this step then that means your done with the project. To use this project just turn on the power, turn on the led and twist the potentiometer to move the led.
We have a be nice policy.
Please be positive and constructive.