Now to get the code onto the micro:bit.
This turned out to be easier than I expected. I attached the micro:bit before starting up the R Pi. (I don’t know whether this matters but I thought it was better to have everything wired up beforehand.)
I took the code, you see above, from www.raspberrypi.org resources about Getting started with the micro:bit. I then saved it in a new folder called Mu Python and chose ‘Flash’ from the top menu to flash the code across to micro:bit. As expected, when I pressed button A the message scrolled across the display, etc.. What I love, about the BBC micro:bit, is how easy it is to get the code onto the micro:bit. After using some other types of microcontroller, that have required you to hold down buttons and choose exactly the correct time to flash the code, this is just so much more straightforward!
There are lots of images you can get it to draw automatically such as HAPPY and SAD faces and CLOCK faces. A full list of them is given here: micro:bit micropython . Don’t forget to add a sleep()* statement though e.g. sleep(500), so that your image stays on the micro:bit long enough for you to see it!