Closed freetoair closed 2 years ago
HI @freetoair
If your use-case is different from normal, you have to read the open source code, then you'll understand what to use.
For example Duration = 0 or not specified => run indefinitely
// Interval (in ms) and duration (in milliseconds). Duration = 0 or not specified => run indefinitely
template<typename TArg>
bool attachInterruptInterval(unsigned long interval, void (*callback)(TArg), TArg params, unsigned long duration = 0)
Yes, I know the total number of serviced IRQ requests is 5, but the first 3 are undefined. I saw that on the oscilloscope, and I can't find a reason why that is.
Using Hardware TimerInterrupt
requires better knowledge and skills, so I'll leave the question for you to find out.
Finally, if it's not an issue or bug of the library, post on Discussions to ask for help, not here. Also you have to follow the minimum request of specifying
as specified in Issue: Bug report
It seems that you use very old library version v1.0.2
, while current version is v1.8.0
Continue doing this way will get you blocked from posting in the library issues/discussions
Good Luck,
Ok, thanks for the recommendation. I have updated the library, but unfortunately still without success. It doesn't matter, I solved the problem with a few commands in assembler. I apologize for posting my problem in the wrong place.
regards, freetoair
It's great that you found out your way. No apology needed. I was just a little bit hard to make it easier for other users to search and post the possible bug.
If you feel necessary, thru your experience, it's better to add that kind of example for other users. I'll do as I don't know if the use-case is popular or difficult to write.
You can also make a PR if you'd like.
Regards,
Of course I will share my experience. For now I'm testing the code, when I'm sure it works correctly I'll post it. The solution is not directly related to your library, it is more an example for using AVR timer1 counters as one shoot timer. If it can help someone why not post it.
regards, freetoair
I'd like to know what the problem is, probably in my code, but I've tried everything I know, and no luck. I'm trying to write a One shoot timer, but it doesn't work. Look at this code, if you can help me.``
Yes, I know the total number of serviced IRQ requests is 5, but the first 3 are undefined. I saw that on the oscilloscope, and I can't find a reason why that is.