Panic code 14 RunningAverage library

I am trying to monitor several DHT sensors and average some of their results. any time I add averaging to the program, I get a panic 14 code on the console and in the red SOS blinks.

As far as I can tell, that error is a memory over-run issue but i cannot see anywhere where my memory is being over used.

It would be nice if could run through the code slowly to find where it bombs out. Im half tempted to start re-writing the code from scratch.

@angellxp, can you post your code or if you have it on the Web IDE, provide a share link?

{Removed code}

Didn’t know I could do that. thanks. I didn’t want to to copy and paste all 600+ lines here.

This version is manually averaging. the prior version used the running average function. Both will cause the panic 14.

I have tested each of the included libraries and the only one that started caused the code was average


You definetly don’t want to execute all these high level calls from within an interrupt handler.
Especially anything that delays the execution inside an ISR is an absolute no-go.

Why would you need to execute all these via a high accuracy timer interrupt.
For most - if not all - functions I’d think a Software Timer call would be more than enough.

I’d also advise against the use of String objects to the extent you do in your code.
You may also consider using Serial.printf() or snprintf() instead of a plethora of individual Serial.print() statements.

1 Like

Thanks for all the suggestions. I have two serial output sections, one for detailed output and another for minimal output. Screen readable or csv in other words. Now i don’t need either of them as I’ll be using the publish command more now.

I’ll try rearranging some stuff and see how it works out.

Everything seems to work now that I don’t have the timing the way it was. Thanks

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.