
In this tutorial we will control the lighting of an LED via the two buttons A and B of the micro: bit card:
1- When you press button A, the LED lights up
2- When you press button B, the LED goes out.
As for the assembly, it is easy to connect LEDs to the micro: bit either by using alligator clips or a micro-bit breadboard adapter.
micro: bit card
1 red LED
1 resistance of 220Ω
Micro: bit GPIO Expansion Board (for setups 2 and 3)
connecting wires
As for the assembly, it is easy to connect LEDs to the micro: bit either by using alligator clips or a micro-bit breadboard adapter. We connect the Po pin of the micro-bit card to the resistor, then the anode (+ terminal) of the LED and the cathode (- terminal) of the GND of the micro: bit card.
There are many mounting methods and here are some examples:
Here is the makecode program which controls the lighting of an LED connected to Pin 0 of the micro: bit.