1
0
mirror of https://github.com/undera/pylgbst.git synced 2020-11-18 19:37:26 -08:00

Merge branch 'master' of github.com:undera/pylgbst

This commit is contained in:
Andrey Pohilko 2019-03-23 13:50:06 +03:00
commit 3f47d1ce70
2 changed files with 3 additions and 3 deletions

View File

@ -14,7 +14,7 @@ def demo_led_colors(movehub):
# LED colors demo # LED colors demo
log.info("LED colors demo") log.info("LED colors demo")
movehub.color_distance_sensor.subscribe(lambda x, y: None) movehub.color_distance_sensor.subscribe(lambda x, y: None)
for color in COLORS.keys()[1:] + [COLOR_BLACK]: for color in list(COLORS.keys())[1:] + [COLOR_BLACK]:
log.info("Setting LED color to: %s", COLORS[color]) log.info("Setting LED color to: %s", COLORS[color])
movehub.led.set_color(color) movehub.led.set_color(color)
sleep(1) sleep(1)

View File

@ -2,14 +2,14 @@
To use it, install this android app: To use it, install this android app:
https://play.google.com/store/apps/details?id=com.mscino.sensornode https://play.google.com/store/apps/details?id=com.mscino.sensornode
Then open app on phone and choose "Stream" => "Stream live data (XML)". Then open app on phone and choose "Stream" => "Stream live data (XML)".
Check the "Accelerometer" option and put your IP address into corresponding filed. Check the "Accelerometer" option and put your IP address into corresponding field.
Specify port there as 8999, and enable streaming. Then run this script on computer. Specify port there as 8999, and enable streaming. Then run this script on computer.
""" """
import logging import logging
import socket import socket
import time import time
from . import Vernie from examples.vernie import Vernie
from pylgbst.peripherals import ColorDistanceSensor from pylgbst.peripherals import ColorDistanceSensor
host = '' host = ''