Skip to main content

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)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page