Eduingo EDU03 RGB LED

RGB LED

EDU03

An RGB LED combines a red, a green and a blue diode in one package. By mixing their brightness it can shine in almost any colour.

Specifications

  • Red (R), green (G) and blue (B) diode in one package
  • Common cathode, the brightness of each colour is controlled by PWM
  • The module goes on top of the tower
  • Power 3.3 V, the LEDs are driven straight from the pins
  • Current ≈ 5–10 mA per colour, full white ≈ 25 mA (estimate)
  • Does not use the I2C bus
  • Uses: PC and gaming setups, lighting, indicators

Pins

Pin Function
IO5 Red (LED_R)
IO6 Green (LED_G)
IO7 Blue (LED_B)

Wiring diagram

RGB LED wiring diagram

Example code

Try the example Rainbow lamp right in your browser in Eduingo AI Lab. The RGB LED shows all the colours of the rainbow one after another: red, orange, yellow, green, blue and purple, and then starts again. A colour is given as a code like #ef4444: the first two characters after the hash are red, the next two green and the last two blue. Try adding pink or making the rainbow faster.