From edce56e73cb9db2266715db937186eb2667ba5b5 Mon Sep 17 00:00:00 2001 From: gcohen Date: Tue, 6 Jan 2015 01:07:07 -0800 Subject: thread test --- python/examples/futureHouse/futureHouse.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'python') 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) -- cgit v1.2.3