def set8x8(self, index, gridType): # simulation self.display.set8x8(index, gridType) # real commObject = CommRequest('b') commObject.markDone() return commObject
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
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
def set7segment(self, number): commObject = CommRequest('b') commObject.markDone() return commObject
def setReadyLight(self): commObject = CommRequest('b') commObject.markDone() return commObject
def goBackward(self): commObject = CommRequest('b') self.drive(-1) self.forwardCounter += 1 commObject.markDone() return commObject