I have come to a realization: coding for Arduino is like coding with ChatGPT.
Both are very useful tools. Spectacular if you’re learning, experimenting, or quickly prototyping with stuff. In other words, it is best when used to do something that has been done to death before. Venture out of this realm and you better be worth “your salt” (electrolytes are important for proper brain function).
Now, I’m not beyond ducking up royally:
Let’s file this one under “Rust wouldn’t fix this (TM)”.
So it’s good to validate your code/design/results/… against something known. And having finally gotten new bme680 sensors, it was time to do just that. And what a quicker and easier way than to slap it on an Arduino and compare results.
Yeah, it’s never that easy. The original Bosch library doesn’t work on the Arduino at hand (using precompiled blobs), and the DFRobot library from the manufacturer has nothing exposed.
Well fork, let’s do it ourselves and expose the raw data from the sensor.
And no, even that was not enough to figure out that one last discrepancy.
Let’s file this one under “Trust nothing (TM)”.
It’s hot. Let’s play some games.
And when I say “play some games”, I mean anything besides actually playing games. For now, let’s improve the mod for Brotato, with new experiences and resources.
Now, while there are many improvements to make the game even more “playable”. From supporting the new version of the game to implementing a menu to tweak A setting. There was something missing. Namely, my ability to do art.
I’m sure there is someone somewhere saying, “there is no such thing as bad art”. But there is such a thing as better art.
For example, a logo for the Steam Workshop to act as an icon for the mod, created by the code monkey writing this:
And a logo created as a commission from someone who actually has artistic talent and practice:
A bit of a difference, is it not?
And to “touch base” with “the zeitgeist in the room”, I’m also sure someone will point out that for a thing like this, we have many wonderful tools that, with the power of statistical analysis (or machine learning, if you will), can generate images based on a previous dataset, with a convenient text interface in the form of a prompt.
While that is true and those tools are great for prototyping or components in a pipeline of creation, I have not found one with the style of the game. Also, there wasn’t a “clear image” in my mind of what the result should look like. More, like, “how it should feel”. So, what do you do when you have a problem? You find a specialist!
So, what I’m trying to say with all of that is: pay your artists.
Some quality of life improvements for YOU three (you know who you are) that have found and use this page.
Firstly, some improvements to RSS functionality of werc. Now, the built-in blagh blog or the additional barf app have a nice feature that generates an RSS feed list by calling index.rss on the content folder. Something that I think would be cool for any folder. Maybe you’re interested in just part of the site or would like an RSS feed update when new content is posted, but is not a blog.
Well, this feature is no longer missing! Introducing the rrsfy werc app, which allows for RSS feed creation on any configured folder through the index.rss “interface”.
This brings the available feeds for this site to:
- blog https://offbeatpursuit.com/blog/index.rss
- paste https://offbeatpursuit.com/paste/index.rss
- notes https://offbeatpursuit.com/notes/index.rss
And while we’re here, since the code for the rssfy is based on the existing apps, a fix for the creation date if posts for barf.
To improve the blog, let’s make an index of tags. More in the web notes
The barf comes with some scripts (some work, some are author specific), and one of them (gt) generates a list of posts and associated tags (which makes clicking on the tag and displaying associated posts work).
Now, let’s add some custom magic to generate a header with clickable links. And there we go.
Secondly, there are also some CSS tweaks to spruce up the look.
How all this affects the look is left as “homework” for the reader to figure out.
Now, regarding developing structures, let’s talk about balancing trees.
Sometimes it is not just a problem of a difference in proportion of branches, but an unsuitable root node. So, what to do?
First, prepare a replacement root node.
Link the new root node to the tree structure.
Make sure all the connections are updated.
Do proper testing and inspection. Multiple tests over time are preferred.
There’s nothing wrong with some application of exception handling.
The goal is for the new root node to properly support the structure and handle the load.
It’s all coming together now.
Now, this “screenshot” took some “duct tape” and “grease” to put together. It can be summed up in three categories.
Setting up cron to periodically collet data from a sensor. This (plan9) being a distributed system, has its quirks. One of them was to run cron on a standalone system, since cron is meant to be run on an auth server and log into a designated machine and remotely execute a command there. So, a hacky script was developed to run cron only once from the system owner’s profile file.
Processing and plotting collected data. All glory to the power of the “old school” publishing tools (grap | pic | troff | gs), but it got done in the end. Once an image of a plot was coaxed from the pipeline, it still needed base64 utility, which the internet provided.
And wrapping everything up in a werc app to serve it on a page.
Well, there is an rc script doing the publishing tool chain on the collected data inside the werc app. But the point is, it works!
Another month, another file system.
Something a bit more interesting this time. An environmental sensors, to be connected to the humble “server”: bme680.
Though, it needs to be said, this one brought back memories of disdain of dealing with datasheets. Now, nothing wrong with them, in fact, they are extremely useful. But you can’t help to wonder what the intern was like, who obviously landed the “challenge” of preparing the documentation. We’ve all been there, right? (No? Just me?). But you know it’s true, when you have to go scrounge through their official Arduino library to figure out the type of the data read from the built-in registers.
Oh, and I burned the sensor too. How nice, that the datasheet notices that the provided API runs the sensors at 1Hz at max in continuous mode for testing. Not that this is the maximum you should stress the heating element at. Guess who opened the “file” with the data multiple times a second.
And the application note is even more hilarious. For the sensor self test, just make the measurements and if the calculated temperature is between 0°C and 60°C the sensor probably works. Not, by any chance because that would be useful, what are the possible raw bits from the sensor before the conversions, calibrations correction and calculations, to narrow down where the problem resides.
This one was fun! To be continued when the new sensor arrives.