Day 10: Colour mixing
Behind today’s door is the reason for the many 1-kohm resistors. Namely, what you find there is a so-called RGB LED RGB stands for red-greenblue, since this LED is actually three LEDs that can be connected through a common cathode. By varying the brightness of the individual LEDs using PWM, you can generate almost every colour conceivable.
You can see the layout of today’s circuit in the following figure. Note that the somewhat longer leg (the cathode) must be plugged into the GND contact strip.
In the Blynk app, a totally new element comes into play today, namely the ZeRGBa element (combination of Zebra and RGB). You can already see roughly how it works from the colourful design. You can either insert the element in your own new project and adjust the pins manually (red at D3, green at D5 and blue at D6) or load the interface of the test as usual via QR code. Whichever way you choose, don’t forget to enter the new token in the programme, which you can download as usual from below:
When you have uploaded the programme with your data and the interface has started in the app, you can move the circle in the ZeRGBa widget. You see that the colour of the circle changes. At the same time, the colour of the RGB LED on the board changes. So you can have fun playing around and trying out various colours. You can even get white if you move the circle to the top left corner. The three numbers above also give the current PWM value of the pins D3, D5 and D6. This time, too, you can conceivable use the programme for a living room lamp with mood lighting that can be controlled via app.