This is, of course, a tiny fraction of what's actually running on this pi we call fusor pi. It's running a MySQL database that has replication set up to this "space heater" machine at the operations position I'm posting from, among other things.
And yes, without the database schema, this isn't going to be terribly useful except maybe as an example of how I write perl so at least I can understand it later....
But it's here, it works, and this is a backup if nothing else. It's now named fmb as for some of the major changes that have happened along the way, it was handy to change the name from FusorMaster, to fm, to...fmb and keep the older versions around to scare the new one.
This is also two files, one for the GUI description and these are expected to be together at runtime (I run them in my bin directory).
In addition to using the database, this has a status window type of thing I can send debug and info messages to during a run. This is also logged in a file with the name being the current timestamp.log at the start of a run. Sometimes handy, this records whatever the dumb operator did too - in case I forget, being dumb and all.
I'm so dumb I even used some python inline (from Adafruit) as the perl lib for i/o, used here to create the clapboard signal mentioned elsewhere, was a pain to get working right, so...punt.
Here's some gratuitous screenshot action from padre:
So, the above is my master control panel, so to speak, for the raspberry pi nearest the fusor (there are a couple more that are used as video cameras). Fast enough, and cheap enough not to care too much if I happen to fry one.
This one has a 256 gb SSD disk for the root partition, and that's where the database lives. Frankly, a regular spinner would do fine, this isn't heavily loaded during a run and the extra speed isn't needed here. But...I like fast things.
Yes, when set up right, it really is this simple to stuff formatted data into a database which then automatically replicates on another machine just in case. This "poll" routine is actually called by the GTK runtime at 250ms intervals and it merely scoops up data from the arduinos and parses it in order to stuff in the database, using prepared statement handles. But perl is so hard to read (chuckle) no one would ever figure that out, right?
I will try to get the rest of this up here, including the plot stuff (real simple) database schema, and oops, forgot the custom module I wrote to handle pi cameras, which is not real useful without changes for most of you, as it assumes various naming and share conventions.