def __init__(self, port = None): Robot.__init__(self) # start the client(s): self._pyrobot = None self._pyrobot = RoombaRobot(port) self.volume = 1 self.name = "Roomby" self.startsong = "tada" self.lock = threading.Lock() self.delay = 0.1 self._pyrobot.ir[0].units = "M" myro.globvars.robot = self self.setMode("full")
def __init__(self, id = None): Robot.__init__(self) # start the client(s): self._clients = [] for port in [60000]: self._clients.append(TCPRobot("localhost", port)) self.volume = 1 self.name = "Scribby" self.startsong = "tada" self.lock = threading.Lock() self.delay = 0.1 self._clients[0].ir[0].units = "M" self._clients[0].light[0]._noise = [0.05, 0.05, 0.05]
def __init__(self, id=None): Robot.__init__(self) # start the client(s): self._clients = [] for port in [60000]: self._clients.append(TCPRobot("localhost", port)) self.volume = 1 self.name = "Scribby" self.startsong = "tada" self.lock = threading.Lock() self.delay = 0.1 self._clients[0].ir[0].units = "M" self._clients[0].light[0]._noise = [0.05, 0.05, 0.05]
def __init__(self, serialport = None, baudrate = 115200): Robot.__init__(self) self.debug = 0 self._lastTranslate = 0 self._lastRotate = 0 self._volume = 0 if serialport == None: serialport = ask("Port", useCache = 1) # Deal with requirement that Windows "COM#" names where # >= 9 needs to # be in the format "\\.\COM#" if type(serialport) == str and serialport.lower().startswith("com"): portnum = int(serialport[3:]) if portnum >= 10: serialport = r'\\.\COM%d' % (portnum) self.serialPort = serialport self.baudRate = baudrate self.window = None self.id = None self.name = "SRV-1" self.open() myro.globvars.robot = self
def __init__(self, serialport=None, baudrate=115200): Robot.__init__(self) self.debug = 0 self._lastTranslate = 0 self._lastRotate = 0 self._volume = 0 if serialport == None: serialport = ask("Port", useCache=1) # Deal with requirement that Windows "COM#" names where # >= 9 needs to # be in the format "\\.\COM#" if type(serialport) == str and serialport.lower().startswith("com"): portnum = int(serialport[3:]) if portnum >= 10: serialport = r'\\.\COM%d' % (portnum) self.serialPort = serialport self.baudRate = baudrate self.window = None self.id = None self.name = "SRV-1" self.open() myro.globvars.robot = self