Does the controller that comes with the Hercules 4wd robot kit have built in processing for the motor encoder inputs or will the code loaded into the controller that drives the motors have to read the encoder values and adjust the motor speeds itself?
Is there and API doc listing the motor commands and requests available from the controller?
Thanks
It looks like a great, powerful robot chassis and controller.
Hi all, the Hercules doesn’t have any encoder or decoder built in, we just add some HALF-BRIDGE DRIVERs to the board which can control the polarity of power supply to change the direction of motors. And some pins of ATmega328 are just breakout as a encoder interface port which can be used easier by people. More information please refer to the schematic of Hercules.
void loop()
{
MOTOR.setSpeedDir(DIRF, 80); //Set motor 1 and motor 2 direction:DIRF, Speed:80 (range:0-100).
delay(3000);
MOTOR.setSpeedDir(DIRR, 80); //Set motor 1 and motor 2 direction:DIRR, Speed:80 (range:0-100).
delay(3000);
}
There’ve some HALF-BRIDGE DRIVERs(IR2104s) which you can find on the main board, we control the speed of motors via the input signal of IR2104s, and the signal comes from a PWM pin of ATmega328. So change the Duty cycle of PWM, then control the speed of motors.
And of course, we can control the polarity of power supply to change the direction of motors via different input signals of IR2104s.