In this quick example, we'll see how to make a beautiful Larson Scanner as in the TV show Knight Rider.
Circuit
You can make it any number of LEDs you like. Here is the code that moves 6 LEDs in sequence.
This project is called LED chaser or Larson Scanner
Code
Circuit
You can make it any number of LEDs you like. Here is the code that moves 6 LEDs in sequence.
This project is called LED chaser or Larson Scanner
Code
/* Knight Rider 3
* --------------
*
* This example concentrates on making the visuals fluid.
*
*
* (cleft) 2005 K3, Malmo University
* @author: David Cuartielles
* @hardware: David Cuartielles, Aaron Hallborg
*/
int pinArray[] = {2, 3, 4, 5, 6, 7};
int count = 0;
int timer = 30;
void setup(){
for (count=0;count<6;count++) {
pinMode(pinArray[count], OUTPUT);
}
}
void loop() {
for (count=0;count<5;count++) {
digitalWrite(pinArray[count], HIGH);
delay(timer);
digitalWrite(pinArray[count + 1], HIGH);
delay(timer);
digitalWrite(pinArray[count], LOW);
delay(timer*2);
}
for (count=5;count>0;count--) {
digitalWrite(pinArray[count], HIGH);
delay(timer);
digitalWrite(pinArray[count - 1], HIGH);
delay(timer);
digitalWrite(pinArray[count], LOW);
delay(timer*2);
}
}
This is the Larson scanner effect that was presented in the famous knight rider series in the 80's.
It featured a smart autonomous car that had a talking on-board computer.
Source: Arduino Website , instructables
It featured a smart autonomous car that had a talking on-board computer.
I'd like to mention that this project was one of my first things to make when I started to learn embedded systems using PIC16F84A microcontroller.
Here is my actual circuit
This is Proteus simulation of the circuit
I made this project and posted it in Arabic and English languages. I didn't post a video for it but I still have the circuit.
So I'll post a video soon.
تعليقات
إرسال تعليق