AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Program cpld with arduino nano9/17/2023 ![]() In order to get red light on the LED we will call the setColor() function and set value of 255 for the redValue argument and 0 for the two others. So now in the loop function we will make our program which will change the color of the LED each second. We will use PWM for simulating analog output which will provide different voltage levels to the LEDs so we can get the desired colours. ![]() The cathode will be connected to the ground and the 3 anodes will be connected through 220 Ohms resistors to 3 digital pins on the Arduino Board that can provide PWM signal. ![]() That’s why it has 4 leads, one lead for each of the 3 colors and one common cathode or anode depending of the RGB LED type. So it actually consists of 3 separate LEDs red, green and blue packed in a single case. Any color is possible depending on how bright each diode. It has three different color-emitting diodes that can be combined to create all sorts of color. An RGB LED has 4 pins, one for each color (Red, Green, Blue) and a common cathode. ![]()
0 Comments
Read More
Leave a Reply. |