Incorporate bitio to use microbit as serial i/o device

Issue #8 new
Dan Schellenberg created an issue

There is an excellent project (https://github.com/whaleygeek/bitio) that:

allows you to run code in Python on a PC/Mac/Linux/Raspberry Pi and interact directly with the micro:bit. It works with both Python 2 and with Python 3 on Mac, PC, Raspberry Pi and Linux.

Essentially, a serial connection is made with the microbit, so that you can use the microbit as a sensor/output mechanism when writing regular python code. It would be great if the thonny-microbit plugin could incorporate this project.

What I'm suggesting is that if the default Python interpreter is selected, then calling import microbit should use the bitio module. If the microbit interpreter is selected, however, then the regular thonny-microbit module should be used.

One feature that would make this really great is if there were a second icon added to the Thonny interface. This icon would flash the .hex file associated with the bitio module to the microbit, so that the user could easily get the microbit ready for use as a sensor/output device right inside Thonny.

Comments (2)

  1. Aivar Annamaa

    If I understand correctly, then this plug-in can support it by adding another flash command, which flashes bitio firmware instead of regular Micropython firmware.

    The expected way for installing the bitio's microbit module would be via "Tools => Manage packages", if bitio had the PyPI package. Or do you propose that bitio was already included in thonny-microbit ?

  2. Log in to comment