Home / Community / Blog / LEGO Boost and Python - CentOS 7

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.

Comments

Log in or create a user account to comment.

Just my blog...

Mon Tue Wed Thu Fri Sat Sun
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31