volatile long speed_counter = 0; void increment_speed_counter() { speed_counter++; } END_OF_FUNCTION(increment_speed_counter); no main(): install_timer(); LOCK_VARIABLE(speed_counter); LOCK_FUNCTION(increment_speed_counter); install_int_ex(increment_speed_counter, BPS_TO_TIMER(10)); no while: while(speed_counter>0){ //logica speed_counter--; } //draws