Do I need to call Putdata(&txdata); everytime I want a PWM value (1-7) to move the motor? and can I call it anytime it changes or are there specific times i can only call it?
I have various loops inside the autonomous loop
Here is a small one
Code:
while (movefoward = 1)
{
pwm03 = pwm03;
pwm01=130;
pwm02=130;
Putdata(&txdata);
fowardcounter++;
if (fowardcounter > amountfoward) //If this has moved for amountfoward loops then stop
{
movefoward = 0;
}
}
can I do that in order to have those values executed? or do i need to do it another way