+21622886281
LED Micro:bit

Flash two LEDs with Micro:bit

Purpose of this tutorial:

In this tutorial we will flash two LEDs (red and green) with the micro: bit card every two seconds.

Components required

  • micro: bit card
  • 1 red LED
  • 1 green LED
  • 2 resistors of 220Ω
  • micro: bit GPIO Expansion Board (for setups 2 and 3)
  • connecting wires 

Mounting

To perform the assembly, you can connect the green LED to pin P0 and the red LED to pin P1 of the micro: bit card. There are many mounting methods and here are some examples:

Mounting (1)

Mounting (2)

Makecode program

Here is the makecode program which allows 2 LEDs to flash: green LED connected to pin P0 and red LED connected to pin P1 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