Running the code on real hardware I have found some stuff
- Arduino Timer 0 shall be powered off before enter interrupt, otherwise it will wake up processor (and we don't want that)
void loop() { do_N64(); // Sample and Update Outputs digitalWrite(debugPin2,LOW); // debug // put AVR to sleep set_sleep_mode(SLEEP_MODE_IDLE); sleep_enable(); power_timer0_disable(); // Arduino keeps this timer running sleep_mode(); sleep_disable(); digitalWrite(debugPin2,HIGH); // debug }
- Button activation logic still still need some working
- I will probably have to use Timer 2 to modulate autofire
Working now to find why Timer 1 does not change the timeout value to 100 ms after the paddle interrupt service.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.