-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
python 2.7.13
Raspberry Pi ver 3 B+
#################################
from lib.mBot import *
def buttonHandling(state):
print "button state: ", state
if name == 'main':
bot = mBot()
bot.startWithSerial("/dev/ttyUSB0")
while(1):
try:
bot.requestButtonOnBoard(1,buttonHandling)
except Exception,ex:
print str(ex)
sleep(0.2)
############################
it gives result:
button state: 1023.0
button state: 1023.0
button state: 1023.0
button state: 1023.0
'callback_128'
Attempting to use a port that is not open
Attempting to use a port that is not open
Attempting to use a port that is not open
Attempting to use a port that is not open
Attempting to use a port that is not open_
Metadata
Metadata
Assignees
Labels
No labels