Hi All
I want to control odrive using pwm as I want to ensure my two motors travelling straight and react to gyro readings. I have set the following on odrivetool:
brake_resistance = 2.0 (float)
enable_uart = True (bool)
enable_i2c_instead_of_can = False (bool)
enable_ascii_protocol_on_usb = True (bool)
dc_bus_undervoltage_trip_level = 8.0 (float)
dc_bus_overvoltage_trip_level = 59.92000198364258 (float)
gpio1_pwm_mapping:
endpoint = (0, 0) (RemoteProperty)
min = 0.0 (float)
max = 0.0 (float)
gpio2_pwm_mapping:
endpoint = (0, 0) (RemoteProperty)
min = 0.0 (float)
max = 0.0 (float)
gpio3_pwm_mapping: //vel_setpoint
endpoint = (141, 29713) (RemoteProperty)
min = -1500.0 (float)
max = 1500.0 (float)
gpio4_pwm_mapping: //vel_setpoint
endpoint = (141, 29713) (RemoteProperty)
min = -1500.0 (float)
max = 1500.0 (float)
gpio3_analog_mapping:
endpoint = (0, 0) (RemoteProperty)
min = 0.0 (float)
max = 0.0 (float)
gpio4_analog_mapping:
endpoint = (0, 0) (RemoteProperty)
min = 0.0 (float)
max = 0.0 (float)
In arduino I have set the following:
//in setup()
pinMode(GPIO3_M0, OUTPUT);//Arduino 12->pin3
pinMode(GPIO4_M1, OUTPUT);//pin13 arduino ->pin4
//in loop()
analogWrite(GPIO3_M0,200);
analogWrite(GPIO4_M1,200);
I did motor calibration and index serach through arduino manually. Then I enabled close loop. I was expecting the motors to spin immediately but they don’t. Isn’t that suppose to be the case?