We all remember the technological car in the iconic television series Knight Rider. The most important feature of this car is that the LEDs on front of the car are constantly turn on one by one.
For those who are new in Arduino and want to learn coding, it's time to learn how to make this animation with pot!
Don't mess with breadboard circuits for learning Arduino and coding, just connect the cables and start coding right now!
Meet the Circle Electronic NOOB Series Knight Rider!https://www.circleelectronic.com/knight-rider
What can you do?
Watch Youtube Video
https://www.tinkercad.com/things/6KD66LWNaAa
We will use 74hc595 Shift Register in this project.
So, how to make this animation with shift register.
#define DATA 8
This is our code to make this animation with 74hc595. We will change this to make this with pot.
We change it like it:
#define DATA 8
Now we will read the data from pot
We will connect the pot middle pin to arduino analog 0 pin and read the datas
int pot=A0;
These are the data we get after making the connection. When we change the potentiometer, we read a value in the range 0-1023. We have to convert these values to 0-11.
We will use the map command to do this:
potvalue= map(potvalue,0,1023,0,11);
Now we are changing our code:
#define DATA 8
The final version of this code.
That's it!Our Website: https://www.circleelectronic.com
Github Page: https://github.com/circleelectronic/Knight-Rider
Blog Post: https://www.circleelectronic.com/post/arduino-knight-rider-with-potentiometer
Tinkercad Project Link: https://www.tinkercad.com/things/6KD66LWNaAa
Knight Rider Product Link: https://www.circleelectronic.com/knight-rider
Tindie Product Link: https://www.tindie.com/products/circle/knight-rider/
Watch Knight Rider Circuit Video
Comments