md: C implementation; C++ wraps C

Signed-off-by: Jon Trulson <jtrulson@ics.com>
This commit is contained in:
Jon Trulson
2016-10-18 17:02:33 -06:00
parent df5b3805c5
commit 8ac8be9e0a
16 changed files with 813 additions and 397 deletions

View File

@ -34,14 +34,14 @@ def main():
# set direction to CW and set speed to 50%
print("Spin M1 and M2 at half speed for 3 seconds")
myMotorDriver.setMotorDirections(upmmd.MD.DIR_CW, upmmd.MD.DIR_CW)
myMotorDriver.setMotorDirections(upmmd.MD_DIR_CW, upmmd.MD_DIR_CW)
myMotorDriver.setMotorSpeeds(127, 127)
time.sleep(3)
# counter clockwise
print("Reversing M1 and M2 for 3 seconds")
myMotorDriver.setMotorDirections(upmmd.MD.DIR_CCW,
upmmd.MD.DIR_CCW)
myMotorDriver.setMotorDirections(upmmd.MD_DIR_CCW,
upmmd.MD_DIR_CCW)
time.sleep(3)
print("Stopping motors")