Variables out of control!

Hi again all,

I am trying to combine two of my sketches that work well alone, and the combination is not that complicated. The strange thing is that it works from time to time, but then suddenly one or all three variables for the temperatures are lost, indicating anything from -1500 deg C to 3000 deg C! The variables are locked inside an if and a switch case, declared as 0 and updated every 10 mins from a serial event, but suddenly they are out of control. It doesn't sound like a memory thing to me.
Has anyone seen anything similar, in general terms?

It doesn't sound like a memory thing to me.

Does to me. Classic buffer overrun bug.

You were right. I moved an array into a function (was not needed outside) and it worked. It's easier to find the fault when you know what to look for...

You were right

Don't be so surprised. It's been known to happen occasionally. :wink: