RPI Motor

From ElectroDragon
Jump to navigation Jump to search

IIC Motor Drive Board

RPI motor test 1.png
tar xvzf Raspi_MotorHAT.tar
cd Raspi_MotorHAT
sudo python StepperTest.py
  • Use Guide
myStepper = mh.getStepper(200, 1)       # 200 steps/rev, motor port #1
myStepper.setSpeed(30)                  # 30 RPM
  • multiple channel use guide(refer to DualStepperTest.py code)
stepper1.step(100, Raspi_MotorHAT.FORWARD, Raspi_MotorHAT.SINGLE)
stepper2.step(100, Raspi_MotorHAT.BACKWARD, Raspi_MotorHAT.SINGLE)