-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
could it be the makeblock mbot firmware for ultrasonic having performance issue ?
I did a comparison by just putting print(".."); to the onread python codes for lightsensor and linesensor it print out super fast but ultrasonic. Pls help
`
def __onRead(self,callback):
while 1:
if(self.exiting==True):
break
try:
if self.device.isOpen()==True:
n = self.device.inWaiting()
print("..");
for i in range(n):
r = ord(self.device.read())
callback(r)
sleep(0.01)
else:
sleep(0.5)
except Exception,ex:
print str(ex)
self.close()
sleep(1)
`
Metadata
Metadata
Assignees
Labels
No labels