I've just started with Axon and i wrote a simple program
// This is the main loop
TICK_COUNT appControl(LOOP_COUNT loopCount, TICK_COUNT loopStart)
{
pin_make_output(E5);
while(button_pressed())
{
pin_high(E5);
delay_us(700);
pin_low(E5);
delay_ms(10);
}
pin_high(E5);
delay_us(2100);
pin_low(E5);
delay_ms(10);
return 0;
}
There should be no noticable delay, but when i push the button on off on off, the the servo doesn't respond immediately. Why is this?
I also had a problem with a for loop that counted servo pwm up and down between 700-2000. Servo moved CW and CCW like it was supposed to, but it did it slowly and with stuttering. Maybe like 200-500ms stutter on each step.
I have to say that this is is very confusing compared to the PIC. There are like a million header files which mostly don't make sense to me. Why doesn't the program just start with a couple of includes and int main() like PICs?