Advanced Lawnmower Simulator for the BBC Microbit

Advanced Lawnmower Simulator for the BBC Microbit

Remember some time back I created a version of Advanced Lawnmower Simulator for the Codebug? Well, I’ve now got hold of a BBC Microbit, which at first glance is a very similar piece of kit, and I’ve ported my Codebug version over to it.

The Microbit appears more powerful than the Codebug, but the basic unit is very similar. A and B buttons, some connectors for external sensors or outputs, and a 5×5 LED array. Even the block-based programming language is virtually the same. The Microbit has a built in compass and accelerometer though, and one slight but important change to the LED array – the Codebug origin is in the bottom left of the array, but on the Microbit it’s the top left. An odd choice for the Microbit, in my mind, as bottom left makes more sense to a programmer or mathematician. It also meant I had to modify a bit of my “code”.

Anyway, here’s the video of it up and running. The “title screen” takes ages to scroll, but I left it in there on purpose.:

If you have a Microbit, you can run it yourself with this hex file, or you can import this file into the Microbit block editor.

You’ll probably notice that the code is remarkably similar to the Codebug one I did a few months ago, and you’d be right. Aside from some semantical changes and the change to the array notation, it’s virtually identical. Which meant it was very quick to get up and running!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.