python module for reading data from microbit serial port
Project description
MicroSerial is Python module for receiving data from BBC micro:bit serial port. Simplest example:
from microserial import Microbit
m=Microbit()
#Microbit is stream type:
for i in m:
print(i)
Or, a bit more complex example, but does the same thing:
from microserial import Microbit
m=Microbit()
while True:
print(m.readline())
You can redirect Microbit to stdout
from microserial import Microbit
m=Microbit()
#replaces stdout
m.replace_stio()
#reads from it
a=input()
#return back to normal
m.rstio()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
microserial-1.1.4.tar.gz
(2.0 kB
view hashes)