1
0
mirror of https://github.com/undera/pylgbst.git synced 2020-11-18 19:37:26 -08:00
2017-09-16 20:27:56 +03:00
2017-09-16 20:27:56 +03:00
2017-09-16 20:27:56 +03:00
2017-09-13 21:00:46 +03:00
2017-09-16 18:14:04 +03:00
2017-09-13 13:46:13 +03:00
2017-09-16 18:14:04 +03:00
2017-09-16 00:46:37 +03:00
2017-09-16 00:46:37 +03:00

Python library to interact with LEGO Move Hub

Requires gattlib to be installed, currently Python 2.7 only

Best way to start is to look into demo.py file, and run it. If you have Vernie assembled, you might look into and run vernie.py file.

Features

  • auto-detect and connect for Bluetooth device
  • auto-detects devices connected to Hub
  • permanent Bluetooth connection server for faster debugging
  • angled and timed movement for motors
  • LED color change
  • sensor data subscribe/unsubscribe
  • battery voltage available

Usage

from pylgbst import MoveHub

hub = MoveHub()

for device in hub.devices:
    print(device)

Debug Server

sudo python -c "from pylgbst.comms import *; import logging; logging.basicConfig(level=logging.DEBUG); DebugServer(BLEConnection().connect()).start()"

Roadmap

  • experiment with motor commands, find what is hidden there
  • Give nice documentation examples, don't forget to mention logging
  • make sure unit tests cover all important code
  • generalize getting device info + give constants (low priority)
Description
No description provided
Readme 1.3 MiB
Languages
Python 100%