I settled on the idea of using the Microbit's accelerometer to control an object flying through Minecraft. What object, well it had to be the X-Wing, from my previous Minecraft - Star Wars project.
The A button starts and stops the X-Wing, by tilting the Microbit left and right you can turn and the B button drops blocks of TNT which create craters where they land.
There are 2 python programs:
- microbitreaddata.py - this runs on the Microbit and reads the status of the buttons and accelerometer
- mcfly.py - this runs on your computer (I used a Windows PC running Raspberry Juice and full Minecraft, but it would work on a Raspberry Pi as well) which reads the data from the Microbit and makes all the calls to move the X-Wing in Minecraft.
Thanks for that, I might have a go with the Pi and SenseHat
ReplyDeleteYep that'll work!
DeleteIt might be relatively easy to do this with an ESP8266 and send the accelerometer and button data via your android smartphone via an app like RoboRemo. You would just have the ESP8266 send the received commands to its serial port. Or perhaps you could just have RoboRemo connect directly to whatever is hosting Minecraft.
ReplyDeleteIt might be relatively easy to do this with an ESP8266 and send the accelerometer and button data via your android smartphone via an app like RoboRemo. You would just have the ESP8266 send the received commands to its serial port. Or perhaps you could just have RoboRemo connect directly to whatever is hosting Minecraft.
ReplyDeleteTrying to run it. Do you need to install anything on the pi to get serial to work
ReplyDeleteIs there an easy way to adapt this for a Mac? Great fan of your book and have everything setup as detailed there.
ReplyDelete