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 ...
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 ...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
c++ × 1060arduino-uno × 282
programming × 211
arduino-ide × 124
c × 83
serial × 72
arduino-mega × 66
library × 50
esp8266 × 46
class × 44
array × 43
string × 40
led × 38
sensors × 33
arduino-nano × 32
esp32 × 31
interrupt × 25
pointer × 22
sketch × 21
i2c × 20
variables × 18
lcd × 17
compile × 17
memory-usage × 17
servo × 16