Close

Just one more bug?

A project log for Well well

Monitoring the monitor that monitors the well

darrin-bDarrin B 09/18/2023 at 19:000 Comments

I'll admit that the first version of software I flashed to the WellWell device was a bit of a mess. When an invalid voltage value kept appearing, I became convinced that it was time for a major re-write. (There was also the false alarm and crash at midnight. Beeeeeeeeep!) Now that the re-write has been been debugged, the testing has begun! (There was a bit flag that I failed clear. It really messed things up.)

Testing certain parts of the code requires the well pump to run, but my being loathe to waste water makes this slow going. Fine, I'll make an emulator for the infrared transmitter. Push a button, get a simulated pump cycle. Fun!

Some of the changes made during the rewrite shrank the size of the compiled code to the point where I could add a few more features. There's now a factory reset built-in, more thorough power-on diagnostics, and a special data-only mode when the pump is running.

So, here we are. One last thing to check and the alpha test can begin.

< a few days pass >

Update: The test ended at nearly the same time it started. Tests showed that the main loop was just a little too slow to continuously update everything and not drop the occasional bit of incoming data. I am now putting the finishing touches on a new burst oriented, and interrupt driven data transmitting routine. Stay tuned.

Wow. Lots of changes later, and we're running again. Rather than sending one data item at a time, they're now bundled and sent in groups. There's now a data limiting system in place so unnecessary data packets are not sent. Even found an interrupt bug, where there were 2.5 times the number of expected interrupts being generated. Onward!

Discussions