aboutsummaryrefslogtreecommitdiffstats
path: root/python/examples/futureHouse
diff options
context:
space:
mode:
authorgcohen2015-01-06 01:07:07 -0800
committergcohen2015-01-06 01:07:07 -0800
commitedce56e73cb9db2266715db937186eb2667ba5b5 (patch)
tree5bf33826a27979fc0bbaff21ff4632c0a871d92a /python/examples/futureHouse
parent28397a55476b955f33ce7568f6cc40d2e0a41821 (diff)
downloadpubnub-python-edce56e73cb9db2266715db937186eb2667ba5b5.tar.bz2
thread test
Diffstat (limited to 'python/examples/futureHouse')
-rw-r--r--python/examples/futureHouse/futureHouse.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/python/examples/futureHouse/futureHouse.py b/python/examples/futureHouse/futureHouse.py
index a1ccd77..3a7a9ee 100644
--- a/python/examples/futureHouse/futureHouse.py
+++ b/python/examples/futureHouse/futureHouse.py
@@ -117,10 +117,12 @@ def pnSubscribe():
pubnub.subscribe(channel, callback=callback, error=callback,
connect=connect, reconnect=reconnect, disconnect=disconnect)
-try:
- thread.start_new_thread( pnSubscribe, () )
-except:
- print "Error: unable to start Subscribe thread"
+# try:
+# thread.start_new_thread( pnSubscribe, () )
+# except:
+# print "Error: unable to start Subscribe thread"
+
+pnSubscribe()
# http://www.raspberrypi.org/forums/viewtopic.php?f=37&t=32826
@@ -204,10 +206,10 @@ def startCycling():
for x in range(0,7) :
# 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:
- thread.start_new_thread( cycleLEDs, (x,) )
- except:
- print "Error: unable to start LED thread"
+ # try:
+ # thread.start_new_thread( cycleLEDs, (x,) )
+ # except:
+ # print "Error: unable to start LED thread"
- #cycleLEDs(x)
+ cycleLEDs(x)