Empowering Today’s Learners to Become Tomorrow’s Leaders
What's a Microcontroller with Python and micro:bit
The micro:bit module is a tiny computer with lights, buttons, and sensors. Follow this tutorial to get ready for programming your micro:bit on its own, or as the brain of the cyber:bot robot.
Now, you are ready to write your first program for your micro:bit module. Follow the same procedure for all the programs you write with your chosen micro:bit software.
Connect your micro:bit module to your computer with a USB cable.
Open a browser and navigate to the Online Python Editor site (or click the link below).
In the code editor window, delete all the text that is there.
Type in the following text exactly:
from microbit import *
display.scroll("Hello")
You have two choices for transmitting your program to the micro:bit module:
Click the Download button and drag the downloaded .hex file onto your MICROBIT drive.
— OR—
Click the Connect button, and select the device in the connect dialog, and click the Connect button.
After connecting, the top-left button that used to Download will now be Flash. Click it, and your computer will transmit the program to your micro:bit.
Watch the LED matrix display!
No compatible device found?
If you see a message saying "No compatible device found" you can use the Download button as noted above. If you are on Windows, you can follow the directions here for a possible fix.