+21622886281
Micro:bit RGB LED

Vary the light intensity of an RGB LED module with micro:bit

Purpose of this tutorial:

In this tutorial we will automatically vary the light intensity of an RGB LED module with the micro:bit card.

Required components

  • micro:bit
  • RGB LED module
  • micro:bit GPIO Expansion Board (for mounting 1)
  • the connecting wires

Mounting

We connect:

  • the pin Po of the micro:bit board to the pin (R) for the red color of the RGB LED module
  • the pin P1 of the micro:bit board to the pin (G) for the green color of the RGB LED module
  • the pin P2 of the micro:bit board to pin (B) for the blue color of the RGB LED module
  • the pin GND of the micro:bit board to pin (GND) of the RGB LED module

The mounting methods are numerous and here are some examples:

Mounting (1)

Mounting (2)

Makecode program

Here is the makecode program which automatically varies the light intensity of an RGB LED with the micro:bit card.




0 commentaire


Leave a comment

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Scroll to Top