+21622886281
Micro:bit RGB LED

Check the ignition of an RGB LED by the micro:bit buttons

Purpose of this tutorial:

In this tutorial we will control the ignition of an RGB LED via the two buttons A and B of the micro:bit card:

1- When we press the button A, the LED lights up in red.

2- When you press the B button, the LED lights up green.

3- When you press the 2 buttons A and B at the same time, the LED lights up blue.

Assembly Connect:

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

Required components

  • Micro:bit led RGB 3 board
  • Resistors of 22O Ω micro:bit GPIO Expansion Board
  • Connecting wires

The mounting

methods are numerous and here are some examples:

Mounting (1)

Mounting (2)

Program makecode

Here is the program makecode which allows to control the ignition of an RGB LED with the buttons of the micro:bit.




0 commentaire


Leave a comment

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

Scroll to Top