Example Code for micro:bit-MakeCode-Breathing light
This article offers a comprehensive guide to creating a breathing light effect with micro:bit and MakeCode, including hardware setup, wiring, and coding tips.
Hardware Preparation
- Components: 2 jumper wires, 1 LED light, 1 resistor of 220Ω.
- Pin: connect the LED to P1.
Software Preparation
- Makecode: Click to enter makecode online programming environment: https://makecode.microbit.org/
Wiring Diagram

Sample Code
- Screenshot of makecode graphical codes:

Result
The LED light blinks like twinkle stars.
Was this article helpful?
