diff --git a/demSequence.py b/demSequence.py new file mode 100644 index 0000000..bfef2ff --- /dev/null +++ b/demSequence.py @@ -0,0 +1,13 @@ +import meControll + +arm = meControll.meArm() + +pickupLeft = [b'S1', b'T130', b'R110', b'L50', b'R150',b'G170', b'R110' ] +drop_right = [b'S1', b'T50', b'R150', b'G90', b'R100', b'D1'] + +arm.addMove(pickupLeft) +arm.addMove(drop_right) +arm.execMove(0) +arm.execMove(1) + + diff --git a/meControll.py b/meControll.py index e73b573..4beaaf5 100644 --- a/meControll.py +++ b/meControll.py @@ -22,6 +22,7 @@ class meArm: [print(i, x) for i, x in enumerate(self.moves)] def sendCmd(self, cmd = b'H1'): + self.ser.flushInput() #Last change. if broken remove this while(1): line = self.ser.readline() # print(f"sendCmd: {line}") @@ -53,6 +54,25 @@ class meArm: c+=1 if c ==2: break + + + + + + + + + + + + + + + + + + + if __name__ == '__main__':