Micro:bit compass example in micropython
The micro:bit also has a compass (magnetometer)
The compass has to be calibrated before it can give accurate readings. Calibration involves moving a dot to make a circle on the matrix. Once this is complete...
Micro:bit accelerometer Micropython example
The micro:bit has an accelerometer on board, you can see this in the picture below
When you flash the program, you should see a reading of the accelerometer x axis being printed at the bottom of...
Random image on the Micro:bit using Micropython
The Image class also has the following built-in instances of itself included as its attributes (the attribute names indicate what the image represents). In this example we will randomly display an image on the...
Image examples for the Micro:bit using Micropython
Here we show you how to create a custom image on the led matrix, we use the Mu editor - http://codewith.mu/
from microbit import *
im = Image('99999:90009:90009:90009:99999:')
display.show(im)
You can vary the brightness by changing the value of...
LED pattern using the Microsoft Block Editor for Micro:Bit
Go to the micro:bit web site and follow the hyperlink to Create Code. Choose the Microsoft Block Editor and make a New Project.
Look in the Basic section for the show leds block.
Drag it into...
MicroBit push button and display image example
A simple example using the 2 buttons (a and b), pressing them will display one of the built in images on th 5x5 LED display on the Micro Bit
The Image Class can display a...
MicroBit overview
If you have no idea what a Micro:Bit is hen this will introduce you to this intriguing board
The Micro Bit measures 4 × 5 cm the device has an ARM Cortex-M0 processor, accelerometer and magnetometer...