def sendPkt(self, pkt, retry=<NUM_LIT:5>, sleep_time=<NUM_LIT>):
for cnt in range(retry):<EOL><INDENT>self.serial.flushInput()<EOL>self.write(pkt)  <EOL>ans = self.read()  <EOL>if ans:<EOL><INDENT>return ans<EOL><DEDENT>else:<EOL><INDENT>time.sleep(sleep_time)<EOL><DEDENT><DEDENT>return None<EOL>
Sends a packet and waits for a return. If no return is given, then it
resends the packet. If an error occurs, it also resends the packet.

in:
        pkt - command packet to send to servo
        cnt - how many retries should this do? default = 5
out:
        array of packets