Your leaking thatched hut during the restoration of a pre-Enlightenment state.

 

Hello, my name is Judas Gutenberg and this is my blaag (pronounced as you would the vomit noise "hyroop-bleuach").



links

decay & ruin
Biosphere II
Chernobyl
dead malls
Detroit
Irving housing

got that wrong
Paleofuture.com

appropriate tech
Arduino μcontrollers
Backwoods Home
Fractal antenna

fun social media stuff


Like asecular.com
(nobody does!)

Like my brownhouse:
   sending serial debugging commands
Wednesday, January 22 2025
The brutal cold continued today, though this afternoon when I took Charlotte for a walk, I took her all the way to the abandoned go-cart tracks and then home through the scrubby forest west of the Farm Road. This time I'd dressed very warmly and could've been out in those conditions for hours.
There was no need to prepare dinner tonight, as we still had plenty of leftover pasta from Gretchen's birthday bash. I cooked up some additional pasta, though, to put in one of the pasta dishes Fern had made, which was now mostly just a hearty red sauce full of vegan meat.

This evening I returned to the project of debugging some code ChatGPT had written to store complex data objects in FRAM (a kind of non-volatile memory that behaves similarly to the classic kind made with ferrite cores). This could would be running on ESP8266 microcontrollers and would, for the first time on devices in this system, create a state on them that would survive rebooting. This meant that a certain class of debugging functions that hadn't been important would now be essential, particularly one that dumps the contents of the saved logged data and one that clear all that data out. And I would need to interact with the controller while it was running to trigger these debugging functions. One way to trigger such actions would be to have some buttons set up that I could push. But that wouldn't scale very well if I ended up having a lot of debugging functions I needed to use. So instead I took followed the example of the Solar Controller, my first major Arduino project (which I started working on back in 2006). The Solar Controller was a live device that needed to be configured in complicated ways while it was operating, so I developed a simple command-line "language" allowing me to control all aspects of it. Later I built a front-end using another Arduino, an LCD display, and an IR receiver that allowed me to change the most important parameters using a television remote. The ESP8266s operate completely differently, checking in to a backend out on the web to log their sensor data and pick up instructions for what they're supposed to do. I suppose I could've leveraged that system to commad them to perform various debugging functions. But it seemed best to send debugging commands via serial while I'm debugging it in the Arduino IDE, especially considering that much of the debugging data would be presented via serial. So this evening I made it so that when there was a line of serial data sent to the ESP8266, it would take that string and forward it to its existing command-processing system (which now has the name runCommandsFromNonJson()). Then I could just add FRAM debugging functions to runCommandsFromNonJson() as needed. I had it sort of working by the time I went to bed. I was excited about this new functionality, since it permits the kind of intensely-targeted debugging that zeroes in on problems without a need for repeated compilations. It would be possible to debug the problems with the FRAM-saving code without such a system, but it would take much longer and it would be difficult to maintain the necessary mental focus. Tonight, though, I had lots of focus because I was jacked up on a combination of diphenhydramine and pseudoephedrine, a recently-discovered drug cocktail that really works wonders on both my mood and my ability to get shit done. For those wanting to try this at home, the doses I take are 150 milligrams of each, though I take the pseudoephedrine about eight or ten hours before the diphenhydramine.


For linking purposes this article's URL is:
http://asecular.com/blog.php?250122

feedback
previous | next