We are currently using mplab and we having trouble with the pulses of the remote. Here is an example of our coding:
Code
Code:
if (rc_dig_in10 == 1)
{
cmd0; //Call the cmd0(forward) subroutine
}
Subroutine
Code:
unsigned char cmd0()
{
pwm01 = pwm02 = 190; //Forward Half Speed
return 0;
}
Basically this is saying that if rc_dig_in10(we are using digital i/o ports 10 through 13) is equal to 1 it will call the cmd0 subroutine. The cmd0 subroutine tells both wheels to go forward half speed.
But this makes it so the pulses just pulse the motors forward and do not hold them at constant forward movement. What are other teams doing to rectify/compensate for this?