last edited Jun 15 2016 by Pete Dring | Created by Pete Dring | Other contributors:
Python projects your students can do with or without a microbit
If your KS3/KS4 students learn to program in python then coding the micro:bit in python makes sense - it’s a great way for students to explore and understand the key concepts of computational thinking when they can ‘see’ their code at work.
Unfortunately, whilst you can write python code for the micro:bit either online or via the excellent mu editor, you can’t simulate that code in a browser like you can for the other programming languages on the BBC website.
Simulating code is no way near as fun as seeing it work on an actual device. But it is important. This resource is my attempt to create a working micro:bit simulator for create.withcode.uk so that you can test your micro:bit python projects in your browser: with or without an actual BBC micro:bit.
This isn’t designed as a replacement for programming the physical devices - but it’s hopefully going to be useful for situations where students have lost / broken / sold their micro:bits or where you want to share / debug code with students quickly.
You can use the simulator by going to create.withcode.uk, typing in:
from microbit import *
Run the code with Ctrl + Enter or using the button in the bottom left.
Debug the code line by line by pressing Ctrl + .
You can also change the options to animate line by line at a speed you set, so you can talk students through what’s happening.
This is an unofficial micro:bit simulator. It’s not affiliated with the BBC and it’s bound to have some teething problems. If you find a bug, please let me know via the comments below.
Each of these tutorials have:
Try it Some working code you can test in the simulator or on a micro:bit to use as a reference or starting point.
Debug it Some broken code so that you can practice finding and fixing common errors
Extend it Some links to find out more and some ideas to stretch the more interested or able.
You can download student activity traccking sheets to get students to record and reflect on their work, with space to keep track of what support they’ve given / reveived to promote independent learning. If your students have 1:1 tablets these pdfs can be shared via Showbie (or similar) so that students can annotate them & you can keep track of their progress. Alternatively, you can print them and get students to fill them in by hand.
How to display text - create a heads or tails simulator.
How to display images - create a spin the bottle random chooser tool.
Buttons and touch pins - create a voting machine to run your own referendum.
If you use this simulator with your students and find it useful, it’d be great if you could add a link to the resources you use here:
You can find additional projects, ideas, resources and info here
By downloading this resource you agree to the CAS resource guidelines and use it appropriately.
Note: Unless otherwise specified, this resource and all associated files are published here under the Creative Commons Attribution-Share Alike 3.0 Licence. If you wish to use a different license, please state this in the description.