Connect a Micro:bit to LED

by Benji45631 in Circuits > Microcontrollers

104 Views, 1 Favorites, 0 Comments

Connect a Micro:bit to LED

This is what you will make. Note: this is a simulator.

Supplies

You will need a micro:bit, a white, blue, or green LED, and crocodile or alligator clips. (it does not matter)

Connecting the Parts

Connect the micro:bit pins: 0, GND (ground) to the LED using clips (crocodile or alligator clips). Connect the longer leg to pin 0. The shorter leg connects to GND.

WARNING: Make sure the alligator clips do not touch each other on the LED or you can short circuit the micro:bit.

Coding It

Make 2 variables: fading, index and put these blocks in your Microsoft Makecode Editor. Find the "digital write pin " block in the pins.

Coding a Satisfying Fade Effect

These are the blocks for the fading effect.