LEGO Boost and Python - CentOS 7
You will need BLED112 dongle and pylgbst library.
yum install python3 pip3 install pygatt pip3 install pexpect pip3 install https://github.com/undera/pylgbst/archive/1.0.tar.gz
now you can write your first program test.py:
from pylgbst.hub import MoveHub, COLOR_RED from time import sleep hub = MoveHub() hub.led.set_color(COLOR_RED) sleep(5) hub.disconnect()
and test it:
python3 test.py
The LED has been changed to red for 5 seconds.
Kommentare
Bitte melden Sie sich Logan oder registrieren Sie sich um kommentieren zu können.