Introduction
Hello friends, in this tutorial i'm going to show you how to make a RGB LED knight rider scanner using arduino. I have used 8 common anode RGB LEDs for this and then I can get basically any colour while lighting the LEDs. Also I add a potentiometer to adjust the speed of LEDs. I am using Arduino NANO board because it is easy to adapt my breadboard and run jumper wires to RGB LEDs. You can also use Arduino UNO or any arduino board for this.Part List
I'm using,- Arduino NANO with Data Cable |Banggood
- 8 x common anode RGB LEDs |Banggood
- 3 x 220 Ohm Resistors |Banggood
- 10 K Ohm potentiometer |Banggood
- Breadboard |Banggood
- Jumper Wires |Banggood
Wiring Diagram
Here is the wiring diagram for this project.by seeing this wiring diagram, you may notice that I have wired the LEDs as a special method. yes, normally we need 3 arduino PWM pins to fully control a RGB LED. if we have to control 8 of them, we will need 24 arduino PWM pins. but in this case we only have limited arduino pins on Arduino NANO. As a solution I wired the LEDs as a LED matrix. The matrix is 3 x 8 in size. Then we can use 3 PWM pins for 3 cathode rows and another 8 Arduino digital pins to control 8 anode columns.
Arduino Code
You can download the Arduino code which I coded for this case HERE.unzip the downloaded folder and open it on Arduino IDE. Now select your arduino board and correct COM port and upload the code to Arduino. That's all you have to do. You can adjust the speed of LEDs by using the potentiometer too. If you need to know how this code works, you can carefully read all comments I put on the code.
Thank you very much for reading my tutorial. I wish you get some knowledge from this project. If you have any problem of this, feel free to ask it via comment section. I will see you with a new post soon...

Comments
Post a Comment