Hi, I would like to create a timer interrupt to regulate how often the WiiChuck library updates readings from a joystick. I have a millis routine in the loop to do it (if elapsed millis = 100, update map) but I wanted to see if I could do the same thing outside the loop.
I am using a Feather V2 and Arduino IDE. I looked at https://learn.adafruit.com/multi-taskin ... t-2/timers and tried to use OCR0A=0xAF; and TIMSK0 |= _BV(OCIE0A); but I am wondering if those are specific to the Uno.
Thank you.
Interrupt Feather V2
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_carter
- Posts: 29473
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Interrupt Feather V2
That code is indeed specific to the UNO. It's actually specific to the ATmega328 (maybe other AVRs) chip on the UNO. So it could potentially work for other ATmega328 based boards. But in general, it is very low level processor specific code.
- forum_questions_1
- Posts: 114
- Joined: Tue Oct 25, 2022 4:05 pm
Re: Interrupt Feather V2
Ok, thank you. Do you know of any examples for the ESP32? I found a couple of videos with examples and got one to work, but just wondering if there is anything on Adafruit github or in the learning section. Thanks!
- adafruit_support_carter
- Posts: 29473
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Interrupt Feather V2
Sorry, not aware of any easy references for the equivalent thing for ESP32.
- forum_questions_1
- Posts: 114
- Joined: Tue Oct 25, 2022 4:05 pm
Re: Interrupt Feather V2
No problem. Thank you.
Please be positive and constructive with your questions and comments.