|
Re: MAKE A MOTOR PULSE????
The easy way to do this is:
You know that user_routines.c Default executes once every 26 (approx) ms.
That means that every 38 loops is nearly exactly 1 second. Simply write a counter, and then an if-then-else. It would look something like this:
count=count+1;
if (count == 38)
{
pwmXX=255;
count=0;
}
else
pwmXX=127;
Note you would want to declare the counter as a static variable.
|