[Microbit-Python] Communicating with a Micro:bit

Damien George damien.p.george at gmail.com
Wed Jan 18 19:34:05 EST 2017


In addition to input(), there is also sys.stdin (and sys.stdout for writing).

On 19 January 2017 at 11:21, Jim Mussared via Microbit
<microbit at python.org> wrote:
> hi Andrew,
>
> Just like regular Python, you can use input()
>
> while True:
>     cmd = input('? ')
>     if cmd == ...
>
> Jim
>
> On 19 January 2017 at 05:09, Andrew Stacey <loopspace at mathforge.org> wrote:
>> Hi all,
>>
>> With a microbit connected to a USB port on a computer I can send stuff from
>> the microbit to the PC using the "print" command on the MB and read it using
>> pySerial on the PC.
>>
>> Can I go the other way?  Obviously, I can send messages from the PC but I
>> don't know how to listen on the MB.  Can it be done?
>>
>> Thanks,
>> Andrew
>> _______________________________________________
>> Microbit mailing list
>> Microbit at python.org
>> https://mail.python.org/mailman/listinfo/microbit
> _______________________________________________
> Microbit mailing list
> Microbit at python.org
> https://mail.python.org/mailman/listinfo/microbit


More information about the Microbit mailing list