- setting up the BBC micro:bit on Linux Lite
- using an online Python code editor
- transferring the code to the micro bit and running it
For this tutorial you will need -
- Linux Lite OS v3.2
- BBC micro:bit
- micro USB to USB cable
- access to the internet
If your BBC micro:bit is not recognized here is the Official Fault Finding Guide
In Fig.2 we can see the default files on the micro:bit.
The MICROBIT is highlighted under devices, right click this and choose unmount, then right click again and choose Eject.
Unplug your micro:bit from the USB port.
Fig.1 shows the rear of the micro:bit, where the orange LED flashes, turn it over so you see the buttons labeled A, and B, now plug it in to your USB port again and observe the LED grid and follow it's instructions -
- firstly you will see the words "Hello, World!" scroll across the grid
- next you will see a mix of animations
- next a Heart shape will appear
- after this you will get instructions to press the buttons A and B
- next you need to tilt your micro:bit and chase the LEDs as they light up on the grid 😊
In Fig.2 are shown 3 files, clicking the file named MICROBIT.HTM should open a web browser, this does not occur for me, it opens Leafpad instead.
As a workaround I instead open Firefox by clicking it's icon in the Panel.
Point Firefox to the BBC micro:bit Python Editor
as shown in Fig.3 below.
When you arrive at the Python editor the default text as shown in Fig.3 will be displayed.
- Down the left side you will see a column of numbers, these are the numbers for each line of code. Example Line 9 is highlighted.
- on Line 6, click your mouse just before World
- delete the word World, and type in your name, or a friends name
- on Line 7, click your mouse just before the word HEART, make sure you are to the right of the dot.
- delete the word HEART and type in the word HAPPY
- at the top left is a button called Download, click this and an image like Fig.4 below will appear.
Initially when pressing download your image will by default have "Open With" selected, change this by clicking the radio button below it, to the left of "Save File", as highlighted in blue in Fig.4, then click OK.
On your Desktop open your Home folder by clicking its icon in the Panel, click to open your Downloads Folder as shown in Fig.5 below.
Inside your Downloads folder you will see a file named, microbit.hex
Right click this file and from the menu that appears select Copy, as shown in Fig.6 below.
Click on MICROBIT in the left pane of the window under the title of DEVICES.
You will see the image as shown in Fig.7 below.
- click inside the window on empty white space
- right click and select paste
- watch your micro:bit, it will now display Hello and your name and then a happy face instead of Hello World and a heart.
Should you wish to return your micro:bit back to scrolling Hello, World!, and displaying a Heart, edit lines 6 and 7 again, if you are unsure use Fig.3 above as your reference.
If you get stuck reopen the Python editor and this will display the default code 😉, download/save, and copy/paste this file to your micro:bit in the same way as above, to restore the default Output.
If you want to experiment with the other images that are built in, or read tutorials on how to make your own images there are info and tutorials here
The Micro:Bit Foundation main page is the hub for all things micro:bit.
You can also reach the Python editor from here by clicking "Let's Code", then scrolling to the Python section.
Below you can see the Prototyping System for the BBC micro:bit, that I use. It's an interesting kit and will allow you to do a wider range of projects and experiments.
You can also get the Prototyping System for the BBC micro:bit as part of the Inventor's Kit for the BBC micro:bit, the Inventor's kit includes some electronics components for specific projects, and is a good place to start if you do not have any components and are just beginning with electronics. The battery pack also enables you to take the above project out with you to show someone your message to them.
Additionally you can edit the code/message with an Android app, and send it to the micro:bit over bluetooth, whilst the micro:bit is powered up by the battery pack.
I hope you enjoyed this post.
Fig.1, and Fig.9 pics taken by Sammy.
Fig.3, and Fig.8 show screenshots from The Micro:Bit Foundation website.