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 details)
File details
Details for the file microserial-1.1.4.tar.gz.
File metadata
- Download URL: microserial-1.1.4.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30d355f30e4b8419e3b40d9ceba15fd2c37e7ca6c0d491cd4420517c242bd745
|
|
| MD5 |
bc1b1828c6169f31b87b9b117da116e7
|
|
| BLAKE2b-256 |
f9eb1069a7686a00e74279fba44565af721dd6541181ecdb2a1d1f2cd413a49a
|