I'm pondering about rewriting my keyboard firmware sketch.
-
I'm pondering about rewriting my keyboard firmware sketch. The sketch is over 8 years old of Arduino C++, and it's rather ugly. There's also very little up to date documentation on why it is the way it is.
I do not currently need the docs, and the sketch isn't meant to be usable by anyone else. But I do wish to write about why I built it the way I did, because I think some of the tricks I use, and some of the considerations and goals would be useful for others. I last wrote about keyboard layout considerations on my blog back in 2016, back before I had my Model 01, while I was still on the ErgoDox EZ. It could use an update.
So I was thinking about writing a blog post... and from that blog post, I'd link to relevant parts of my firmware... and that made me think: what if I rewrote the firmware as Arduino C++ wrapped in Org, in a literate manner? Then the firmware would be the documentation! And my blog post would just be a "Read more here" or something. Or a copy of this toot.
I think I will do that. I kinda crave writing long-form about keyboard stuff again, it's been a while.
-
Gergely Nagy 🐁replied to Gergely Nagy 🐁 last edited by
I spent about half an hour just looking at my firmware sketch, trying to think of ways how I'd redo parts of it with Org. There will be a lot of challenges ahead to not make it feel like a painful exercise.
I mean, I want to make the documentation flow nicely, with code snippets that make sense. But there are limitations I must adhere to, like the order of plugins used in the sketch. The way I would structure the documentation, that order would pose a bit of a challenge.
Same goes for graphics. This would be a graphics heavy document. I need a good way to handle that, too.
On the other hand, I'm looking forward to this challenge, really. I feel it will boost my org skills a lot, and it is also a great project for literate programming: the code is basically done, I will not have to refactor large parts when I rearchitect parts of it, because I simply will not be doing that.