Last modified: 2024-12-08 22:33:01
< 2024-12-07 2024-12-09 >I was thinking that if I have the balance wheel running on a tensioned piece of wire, then it will float up and down as temperature changes the tension of the spring.
And, worse, it will be able to oscillate up and down, because if it's not constrained vertically then it's just a mass on a spring! And tightening and loosening of the spring will naturally make the balance wheel move up and down.
One option would be to use a second spring of approximately the same spring constant, but coiled in the opposite direction, and then there would be no net lowering/raising of the balance wheel as it rotates. Still not sure what to do about the "mass on a spring" effect, maybe it just doesn't matter?
I'm going to get Cursor to duplicate the UI logic for detecting period and amplitude into the server side, and have it store it in a Sqlite database.
If you get a datapoint every 2 seconds, then you get 43200 per day, 16 million per year. ChatGPT estimates about 1.2 gigabytes per year if I have 2 timestamps and 6 floats, and says Sqlite should be fine.
It did a pretty good job, looks to have worked.
Next up is some way for the UI to recall old data instead of only showing current data.
It did an OK job of this too. It's not amazing but definitely adequate.
It would be cool to automatically seed the "live" view with recent historical data, but just being able to see the historical data is good enough for me to make sure I can look at the trace even if I refresh the page in between.
It still leaves the websocket connected but just ignores what it receives, which is wasteful but not necessarily a big deal for the time being. Actually I'll just do it now and then won't have to worry about it.