Hot answers tagged

9 votes
Accepted

Alternative to polling interrupt flag from main loop?

If the task is pretty short and time sensitive, your best option is to put it in the interrupt handler. If the task is big and not too urgent (like: it could well wait for a millisecond or so), your ...
Edgar Bonet's user avatar
  • 42.2k
5 votes
Accepted

Using Adafruit RTClib without fragmenting the heap

I wrote a minimal sketch that calls RTC_DS1307::now(), disassembled it, and here is what I saw: The caller allocates 6 bytes on the stack for holding the return value. It writes the address of this ...
Edgar Bonet's user avatar
  • 42.2k
4 votes

Using Adafruit RTClib without fragmenting the heap

I think you are confusing the stack and the heap. For something to appear in the heap you would expect to see the words new or malloc which I don't see. What is happening here is that a DateTime ...
Nick Gammon's user avatar
  • 37.9k
3 votes

Alternative to polling interrupt flag from main loop?

Since you tagged it Teensy: You could also reduce the priority of the interrupt, so that it can be interrupted by higher priority interrupts. Thus you can implement interrupts with longer durations ...
luni64's user avatar
  • 271

Only top scored, non community-wiki answers of a minimum length are eligible