[Microbit-Python] micro:bit - communications with a PC
Loop Space
loopspace at mathforge.org
Sat Dec 24 15:38:35 EST 2016
Here's something I had a go with for two microbits and a PC.
https://github.com/loopspace/microbit/tree/master/turtle
mb_radio_sender.py is for the free-standing microbit. It takes readings
from various sensors and packages them into a message.
mb_radio_receiver.py is for the microbit connected to the PC, it simply
receives messages and prints them out through the USB.
turtleclient.py is for the PC, it reads from the serial port and then
decodes the message which it uses for instructions to a turtle. You'll
need to change the serial port on line 7.
(the other files were part of experimenting)
It needs a couple of libraries: pySerial and numpy (turtle seems to be
part of the python3 package, but if not you'd need to install that too)
Best,
Andrew
More information about the Microbit
mailing list