How to control the direction of individual motor of gopigo


#1

I am trying to do the PID control of each RPM of motor, how to control the direction of individual motor of gopigo, I see the function:
def motor1(direction,speed):
return write_i2c_block(address,m1_cmd+[direction,speed,0])
But what should be the input of this function?


#2

Hi Yuangao,
We just added an example to test the individual motor control: https://github.com/DexterInd/GoPiGo/blob/master/Software/Python/other_scripts/individual_motor_control.py.

You should run the DI update so that the repo is updated and then try that example.

Do let us know if you need any more help.

-Karan