[Microbit-Python] micro:bit - communications with a PC

Stewart Watkiss stewart at penguintutor.com
Sat Dec 24 14:01:48 EST 2016


>> On 24 Dec 2016, at 09:28, Thierry Chantier <titimoby at gmail.com> wrote:
>>
>> To do that, you'll have to find a way for the PC to communicate on the same radio frequency qith the same protocol.
>> That could be nice.
>>
>>
>>> Le sam. 24 d?c. 2016 ? 00:15, Austen Rose via Microbit <microbit at python.org> a ?crit :
>>> Hi Nicholas,
>>>
>>> I have four microbits that communicate happily over radio, but what I want to do is be able to do is add my PC to the network. So if I have, for instance, my Linux PC as a master controller and then the microbits as slaves, then I could stream data to/from my PC and my microbit network.
>>>
>>> I am using the Mu editor. I don't really have a project in mind, but I'd like to explore the options.
>>>
>>> Thanks,
>>>
>>> Austen Rose
>>> arose85618 at aol.com
>>> _______________________________________________
>>>
It's fairly straight forward to communicate between a PC and microbit 
using serial over the USB port.

I have created something along those lines here:
http://www.penguintutor.com/news/electronics/microbit-rpirobot

That code is based on the micro:bit using USB serial as a console. So if 
you use a "print" on the microbit then you can readline it on the PC. 
That works one-way only, but you could use normal serial communications 
for bidirectional communications.

I did start to look at whether it would be possible to communicate 
between the micro:bit and a Raspberry Pi using the native radio on the 
micro:bit and a nRF24L01 on the Raspberry Pi. Unfortunately I wasn't 
able to get it working when I first tried and due to other commitments 
haven't had time to pursue that any further. In theory it should be 
possible, but I wasn't able to get any of the available libraries for 
the RPi to work and haven't had time to create my own / modify the 
existing code.

Regards
Stewart

@stewartwatkiss



More information about the Microbit mailing list