Minecraft Steve shimmies with micro:bit – Part 1

I found this activity, Micromine Bitcraft  , at raspberrypi.org the other day. It uses the BBC Micro:bit to control Steve’s movement in Minecraft Pi.

microminecraftphoto

The activity uses Mu micropython which I looked at before in Micro:bit with R Pi (2) – Code to micro:bit!  It wasn’t plain sailing because it also uses GPIOZero or gpiozero (as it should be spelt when you type it in some code) in Python3 and I spent a long time trying to find this on my R Pi2 SD card.  (I explained about GPIO in Geek Gran buys a Pibrella .)

In fact you need to put python3-gpiozero into the LX Terminal.  You do this as follows:

sudo apt-get install python3-gpiozero

If it says it’s not available, you need to update and upgrade your SD card’s software.

You do this by typing in LX Terminal:

sudo apt-get update

then let that happen before doing:

sudo apt-get upgrade

If it’s a long time  (or never) since your card was updated you may need to redo the 2nd one with:

sudo apt-get  dist-upgrade

but this takes ages so only do it if you really have to. (I didn’t need to – but had the wrong package name gpiozero instead of python3-gpiozero.) It asked me something about a thing called Plymouth on the way but I just typed q to quit and it carried on. So you need to check the screen occasionally or your upgrade may never complete.

Mind you, I’ve now got the latest version of Raspian with PIXEL (Pi Improved Xwindow Environment, Lightweight) so maybe it’s going to be worth it. By the way, you need to reboot, ie shutdown and start again, before PIXEL is available.

At last I went back to LX Terminal and typed:

sudo apt-get install python3-gpiozero

and it was there!

Now to return to Micromine by putting my male-female jumper wires onto the R Pi, some alligator clips onto the BBC micro:bit and joining them both together – then I’ll report back when I’ve got it working!

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s