Esempio n. 1
0
 def set8x8(self, index, gridType):
     # simulation
     self.display.set8x8(index, gridType)
     # real
     commObject = CommRequest('b')
     commObject.markDone()
     return commObject
Esempio n. 2
0
 def set7segment(self, number):
     commandObj = CommRequest('N' + '|' + str(number))
     if number < 1 or number > 6:
         commandObj.response = 'INVALID'
         commandObj.markDone()
     else:
         self.ard.requestCommand(commandObj)
     return commandObj
Esempio n. 3
0
 def readSensor(self, value):
     commObject = CommRequest('S%s' % value)
     returnvalue = None
     if value == 1:
         returnvalue = self.read_distance()
     elif value == 2:
         returnvalue = self.read_electromagnetic()
     elif value == 3:
         returnvalue = self.read_capacitive()
     commObject.response = returnvalue
     commObject.markDone()
     return commObject
Esempio n. 4
0
 def set7segment(self, number):
     commObject = CommRequest('b')
     commObject.markDone()
     return commObject
Esempio n. 5
0
 def setReadyLight(self):
     commObject = CommRequest('b')
     commObject.markDone()
     return commObject
Esempio n. 6
0
 def goBackward(self):
     commObject = CommRequest('b')
     self.drive(-1)
     self.forwardCounter += 1
     commObject.markDone()
     return commObject