Thursday, 10 May 2018

EduBlocks: BitIO blog 1 "Hello Micro:bit, Hello Minecraft"




This is a very simple introduction to using BitIO with Edublocks on the Raspberry Pi. Firsly lets set out how you need to get set up:






1. Open Minecraft and create a new world, then minimise this for later. Tip, use the tab key to allow your mouse to minimise the Minecraft window.

2. Open Edublocks from the programming menu, this should open in the chromium browser.

3. Plug in your Micro:bit to one of the available USB ports.

4. You will need to download this file and drag a copy of it onto the Micro:bit. This file allows the Micro:bit communicate with your program. Link https://github.com/whaleygeek/bitio/blob/master/bitio.hex

5. Now snap into place the code that you see below. It will trigger a message on the Micro:bit when the 'a' button is pressed and a message in Minecraft when the 'b' is pressed.

Code








6. When you run the program Edu Blocks will show a black screen which will show you the shell output. This tells you what is going on with your program. First of all it will display this message:

No micro:bit has previously been detected
Scanning for serial ports
remove device, then press ENTER

7. So unplug the Micro:bit and press enter.

8. Next the following text will display:

scanning...
found xx device(s)
plug in device, then press ENTER 

9. Now press enter and the following text will display:

scanning...
found 68 device(s)
found 1 new device
selected:/dev/ttyACM0
Do you want this device to be remembered? (Y/N)

10. Press 'y' and enter to confirm and the following text will display:

Your micro:bit has been detected.
Now running your program
11. Now try and pressing the 'a' button and 'b' button. When you press 'b' you should see this...


 Cya












No comments:

Post a Comment