コード例 #1
0
ファイル: RPi.py プロジェクト: tonykoh/DanceDance1
 def run(self):
     my_Ard.clear_buffer()
     while True:
         packet = my_Ard.listen() #packet is in dict format
         #queueLock.acquire()
         if packet is not None: #check if queue is full. If full, dont put it inside queue
             #print("data into queue: " + str(packet))
             dataQueue.put(packet)
コード例 #2
0
ファイル: RPi.py プロジェクト: ZhiWei94/DanceDance1
 def run(self):
     my_Ard.init()
     while True:
         packet = my_Ard.listen()  #packet is in dict format
         queueLock.acquire()
         if not dataQueue.full(
         ):  #check if queue is full. If full, dont put it inside queue
             #print("data into queue: " + str(packet))
             dataQueue.put(packet)
         queueLock.release()
コード例 #3
0
ファイル: test_comms.py プロジェクト: tonykoh/DanceDance1
from arduino import listen, init
import time

print("Welcome to debug mode!")
init()
while True:
    packet = listen()
    if packet is not None:
        print(packet)