I have been working on a way to monitor and control my pool. As of yesterday, I finally got things set up to read data from the pool control and output it to cosm. It worked for a day or two straight with no interruptions. It is possible I may have changed some code, but I don’t remember. Anyways, my program would run collect some data, then sleepfor(120).
Of course, when it is hung in server.configure(), my imp is blinking the standard slow green blink and I cannot upload new firmware without a hard reboot…
Whoops, forgot to put in the server.log(“done configure”) after…
So, I created a new program, and all is working now (same code, just pasted in a little at a time). Going back to the old still hangs. The differences are very minor…
This could be code size, yes. Comments don’t appear in the bytecode so they shouldn’t make any difference.
Ok, wacky. My new program is now doing the same thing. Note, it was working all day, until I removed one of the digital pins (since when the Imp is off, it was floating, and I need it to be 0 volts). I didn’t change the code, though…I put the pin back on, and have the code as it was running all day (just fine) and it is busted. Still hangs in configure…
Ok, interesting. One time it did complete, and I got this error:
ERROR: stack overflow, cannot resize stack while in a metamethod`
</div>
Can you give me the mac address of the card, and try the other one you have? We may be seeing an issue with certain cards not updating. You are showing as having two cards, one of which is on release-2 and one on release-3.
I sent one of the cards back (Atten Nong), as requested by Nong. The other one, ends in 2e2, which I believe you mentioned in your direct e-mail. Is there a way for me to check the release?
Ok, I solved it (thanks Hugo). I did have an infinite loop (that I didn’t notice). For some reason, my RS-232<->RS-485 (which I was reading data from) died, and I am always getting -1 back from hardware.uart12.read(), and I was looping forever.