In this example we take a look at the KY-011 Two color LED module and connect this to a Raspberry Pi.
As you may have guessed this is a common cathode LED with a red anode and a green anode. You can adjust the amount of each color using PWM.
The module does not include resistors so you need to add these
- Color: Green + Red
- Diameter: 3mm
- Case Color: None
- Package Type: Diffusion
- Voltage (V) :2.0-2 .5
- Using a current (MA): 10
- Viewing angle: 150
- Wavelength (NM): 571 +644
- Luminous intensity (MCD) :20-40; 40-80
- Stent type: long-legged
|Raspberry Pi 4||Aliexpress product link|
|37 sensor kit||AliExpress Product link|
|connecting wire||Aliexpress product link|
We use pins 38 and 40 (GPIO 20 and 21) in this example, you can use other GPIO pins but you will have to change the code example.
You need the current limiting resistors