Flashing LED Tutorial with Microbit and Makecode

Making Robotics
0

Hola! If this is your first time working with micro:bit and electronics, you are in the right place. Today, we are going to light up a LED using a few components. Super beginner and friendly — and yes, we will use code blocks!


What Do You Need

  • 1 Microbit (v1 or v2)
  • USB cable
  • 1 LED (any color works)
  • 1 Resistor (220Ω is perfect)
  • Breadboard 
  • 2 jumper wires (or alligator clips)


LED Legs

Every LED has two legs:

  • Long leg → + (Anode / Positive)
  • Short leg → – (Cathode / GND)


Step-by-Step: Breadboard Time

  1. Place your LED on the breadboard, for example long leg on row 11 and short leg on row 12
  2. Place one end of a 220Ω resistor in the same row as the long leg
  3. Connect the other end of the resistor to a different row (e.g., row 7)
  4. Use a jumper wire to connect that row 7 to Pin 0 on the micro:bit
  5. Use another wire to connect the row with the short leg (row 12) to the GND pin on the micro:bit


MakeCode Time

Below you will see a little code preview. Just click on the “Edit” button — it will redirect to the MakeCode website.

Once you are there:

  1. Make sure your micro:bit is connected with a Data USB cable.
  2. Click the “Download” button to save the .hex file to your Microbit.

That’s it — your LED will start flashing like magic!


Try This Too

  • Use Pin P1 or P2 instead
  • Make it blink faster or slower
  • Control it with Button A or B

You Just Did It!

Starting with electronics is exciting, and micro:bit makes it super fun.

If you liked this tutorial, leave a comment. If you want another project, just ask. I am here to help you keep learning.


¡Nos vemos in the next one!

Post a Comment

0Comments

Post a Comment (0)

#buttons=(Ok, Go it!) #days=(20)

Our website uses cookies to improve your experience. By continuing to browse, you agree to our use of cookies. Some cookies are essential for site functionality, while others help us analyze traffic and improve content. If you do not agree with the use of cookies, you can disable them in your browser settings or decline below. Check Now
Ok, Go it!