def write(self, pkt):
self.setRTS(self.DD_WRITE)<EOL>self.flushInput()<EOL>pkt = bytearray(pkt)<EOL>pkt = bytes(pkt)<EOL>num = self.serial.write(pkt)<EOL>return num<EOL>
This is a simple serial write command. It toggles the RTS pin and formats
all of the data into bytes before it writes.