diff options
| author | gcohen | 2015-01-06 00:48:06 -0800 |
|---|---|---|
| committer | gcohen | 2015-01-06 00:48:06 -0800 |
| commit | d0ff5fe09058ab1a8a2c372c99e3108895b059b7 (patch) | |
| tree | 7f6b6c69aa5bd3ac343e8a4227db4b9ba1898dbd /python/examples/futureHouse | |
| parent | b1c1ac7a3da71d2d9c91c2044a5038f54d9f22a5 (diff) | |
| download | pubnub-python-d0ff5fe09058ab1a8a2c372c99e3108895b059b7.tar.bz2 | |
thread test
Diffstat (limited to 'python/examples/futureHouse')
| -rw-r--r-- | python/examples/futureHouse/futureHouse.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/python/examples/futureHouse/futureHouse.py b/python/examples/futureHouse/futureHouse.py index 9aeb6cd..9736b39 100644 --- a/python/examples/futureHouse/futureHouse.py +++ b/python/examples/futureHouse/futureHouse.py @@ -1,7 +1,7 @@ import sys from Pubnub import Pubnub from Adafruit_PWM_Servo_Driver import PWM -import thread +import threading import time import random import Adafruit_BMP.BMP085 as BMP085 @@ -199,7 +199,8 @@ def startCycling(): # print str(x) + ": " + str(leds[x]['minPulseLength']) + " " + str(leds[x]['maxPulseLength']) + " " + str(leds[x]['waitFloor']) + " " + str(leds[x]['waitCeiling']) # Change speed of continuous servo on channel O try: - t = thread.start_new_thread( cycleLEDs, (x,) ) + #t = thread.start_new_thread( cycleLEDs, (x,) ) + t = threading.thread( cycleLEDs, (x,) ) print t.isAlive() except: print "Error: unable to start thread" |
