diff --git a/examples/demo.py b/examples/demo.py index b911592..6093875 100644 --- a/examples/demo.py +++ b/examples/demo.py @@ -14,7 +14,7 @@ def demo_led_colors(movehub): # LED colors demo log.info("LED colors demo") 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]) movehub.led.set_color(color) sleep(1) diff --git a/examples/vernie/android_remote.py b/examples/vernie/android_remote.py index c270afb..90dd57d 100644 --- a/examples/vernie/android_remote.py +++ b/examples/vernie/android_remote.py @@ -2,14 +2,14 @@ To use it, install this android app: https://play.google.com/store/apps/details?id=com.mscino.sensornode 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. """ import logging import socket import time -from . import Vernie +from examples.vernie import Vernie from pylgbst.peripherals import ColorDistanceSensor host = ''