Introduction: Variable Speed Knight Rider
This is my first Instructable so please like it! It was inspired by the 1980s TV show called the Knight Rider, which had a car named KITT with a LED scanner that went back and forth like this one.
So, let's start making it!
1. 16 Red Leds (Diffused or non-diffused)
2. Arduino Mega or Mega 2560
4. Breadboard (optional as you can solder them into perfboard)
Step 1: Making the Connections
Do the connections according to the picture (please forgive my messy wiring) or like this:
1. Connect the Leds to the breadboard or perfboard.
2. Connect all the Leds' positive terminal to the Arduino from pins 22 to 37.
3. Connect all the ground terminals from the Leds to the ground terminal of the breadboard or perfboard.
4. Connect the two outer pins of the Potentiometer to the 5V and GND pins from the Arduino.
5. Connect the middle pin of the Potentiometer (wiper) to Analog pin 0 of Arduino.
Step 2: Uploading the Code
I have given the Code at the bottom of the Instructable.
Download it and Upload it to the Arduino using the Arduino IDE.
Step 3: Testing
If everything is Ok, your Kight Rider circuit should start working and when you turn the potentiometer, the speed should change.
If it works, then Congratulations! Now you have a Knight Rider circuit that changes speed when you turn the Potentiometer!