Esempio n. 1
0
 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)
Esempio n. 2
0
 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()
Esempio n. 3
0
from arduino import listen, init
import time

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