Hello. I'm trying to configure my GoPlus module using the example codes which are very limited on the M5 documentation for GoPlus. I can't find the correct list of addresses to be used anywhere.
I want to power my DC 3-6V gearmotors 1:120 using the code adding an extra 5V external powersupply (max 2A) through the XT30 connector.
I found the max speed in example codes is 250 and min is -250 for the motor command but with other values in between this gives the same issue.
So the code I used is following:
void Motor(void){
Serial.println("-------------------------MOTOR Sturing -------------");
Serial.println(" motorspeed 200");
M5.Lcd.setCursor(40, 60, 2);
M5.Lcd.setTextColor(TFT_WHITE, TFT_BLACK);
M5.Lcd.printf("Test MoTor motorspeed 250 \n ");
goPlus.Motor_write_speed(MOTOR_NUM0, (uint8_t)0x80, 250);
goPlus.Motor_write_speed(MOTOR_NUM1, (uint8_t)0x00, 250);
delay(5000);
Serial.println(" motorspeed 0");
M5.Lcd.setCursor(40, 60, 2);
M5.Lcd.setTextColor(TFT_WHITE, TFT_BLACK);
M5.Lcd.printf("Test MoTor motorspeed 0 \n ");
goPlus.Motor_write_speed(MOTOR_NUM0, (uint8_t)0x80, 0);
goPlus.Motor_write_speed(MOTOR_NUM1, (uint8_t)0x00, 0);
delay(500);
Serial.println(" motorspeed -250");
M5.Lcd.setCursor(40, 60, 2);
M5.Lcd.setTextColor(TFT_WHITE, TFT_BLACK);
M5.Lcd.printf("Test MoTor motorspeed -250 \n ");
goPlus.Motor_write_speed(MOTOR_NUM0, (uint8_t)0x00, -250);
goPlus.Motor_write_speed(MOTOR_NUM1, (uint8_t)0x00, -250);
delay(5000);
Serial.println(" motorspeed 0");
M5.Lcd.setCursor(40, 60, 2);
M5.Lcd.setTextColor(TFT_WHITE, TFT_BLACK);
M5.Lcd.printf("Test MoTor motorspeed 0\n ");
goPlus.Motor_write_speed(MOTOR_NUM0, (uint8_t)0x80, 0);
goPlus.Motor_write_speed(MOTOR_NUM1, (uint8_t)0x00, 0);
delay(500);
}
It just doesn't seem to be able to power the DC connectors. I get a -0.2V max out and a + 0,8V max which isn't enough to run the motor.
Has anyone experience or documentation what adresses of code instructions are to be used to fix this issue?
Or a link with the more complete documentation what commands and adresses to use for steering the servo and DC motor pins?
Because I'm really blocked for weeks now.
Thanks upfront.
Wim