1
0
mirror of https://github.com/undera/pylgbst.git synced 2020-11-18 19:37:26 -08:00
Andrey Pokhilko 16b1612cc6
Review pygatt (#11)
* Cosmetics

* Harmonograph demo

* Cleanup

* Original

* Original

* Cosmetics

* Original file

* Fixes

* cosmetics

* separate classes

* Cosmetics

* Cosmetics

* fix tests

* Remove plotter tests

* Add bluegiga

* Rename it

* Progress

* Fix tests

* Cosmetics

* Found a way for pygatt!

* Playing with gatt

* Fix hung subscribe

* rename class

* add test

* skeleton for autodetect

* safer order

* Fix tests

* Fix test

* Add dbus install

* another try

* 2

* 3

* 34

* 6

* 7

* Isolate some tests

* 8

* back to roots

* Try more

* 9

* Help

* rep

* site-packs

* Fix?

* Py3 come on

* dbus

* busss

* dev null!

* Fix test

* Cleanup

* Fix tests

* Fix after review

* add package

* FIx package paths

* Cosmetics

* Update

* More doc
2018-07-18 13:57:58 +03:00

26 lines
681 B
Python

import logging
import traceback
from pylgbst import get_connection_auto
from pylgbst.comms import DebugServerConnection
from pylgbst.movehub import MoveHub
if __name__ == '__main__':
logging.basicConfig(level=logging.INFO)
try:
conn = DebugServerConnection()
except BaseException:
logging.warning("Failed to use debug server: %s", traceback.format_exc())
conn = get_connection_auto()
hub = MoveHub(conn)
try:
hub.motor_AB.constant(0.45, 0.45)
hub.motor_external.angled(12590, 0.1)
# time.sleep(180)
finally:
hub.motor_AB.stop()
if hub.motor_external:
hub.motor_external.stop()