You probably already know this: AI makes hand-coding firmware, as well as most everything else requiring a frontal lobe, a thing of the past.
This time: two coding projects that usually meant many hours of firmware frustration fun were accomplished by Claude in a single morning.
Coding skill? Not needed. Rigorous planning for function and design? Nope. Modest EE skills, even? Maybe? Probably not.
TLDR? Sure. The incurious ride shotgun when AI is driving. It's a brave (and stupid) new world.
This time I go over what the bot came up with, then think about what it all means.
RANDOM GATE
The original code--for Arduino Nano and +/- 15V Frac--on Github--is here.
Original blog post--early in my DiWHY adventure--is here.
Almost no one uses Frac, and I am moving away from older Microchip MCU's, so I used Claude.ai to port the sketch to my favorite 8-bit dirt-cheap MCU, the ATTINY1616.
I copied the Arduino Nano code into Claude's chatbot, told Claude I was using an ATTINY1616, the ATTINY pins I wanted to use, and told Claude to get busy.
Claude assumed (correctly) that I would use Spence Konde's megaTinyCore for the build's abstraction layer. Literally 127 seconds later: whomps, there it was.
Get its ATTINY code port here.
I copied the new sketch into Arduino IDE; it compiled without error.
Next I uploaded the port to the ATTiny1616 experimenter's board (previous post here; PCBWAY community project here) to see if it worked.
After thorough testing: of course it worked, all of it, no bugs, no problems. We all knew it would.
The firmware port, start to finish, including testing, took about an hour.
Amazing!
I then used Kicad 10 to modify the schematic for the Experimenter's Board to accommodate the pins, pots, LED's and jacks needed for a Eurorack version. Schematic and PCB layout can probably also be done (better) with AI, but I don't know how to bring AI to bear for EDA, at least not yet.
WIFE GATING
Next up--can I create an entire new project's firmware using AI? Of course.
This next design was inspired by Intelligel's "Tangrams" gate generation subcircuit. If Behringer can rip off Intelligel, why can't I?
Instead of coming up with a functional spec (boring!) I created a WIKI user manual:
WIFE-GATING: A 6HP Eurorack module akin to dating, marriage, and procreation.
DEFINITIONS
DURATION * CHANCE creates a single “situationship” (I had to call this something….)
DURATION: how long the situationship lasts if CHANCE is set to zero.
CHANCE: Add or subtract a random amount of time from the DURATION value. Think in-laws.
KIDS: Output of the situationship. In this context it’s a 5V variable length GATE OUT.
MODES
"1 & Done": each BEGIN pulse means a single, entire DURATION + CHANCE situationship, i.e., early dating. A “kid” is produced--always--sorry Elmo, ya should've been more careful about birth control.
"Remarry": The situationship produces a KID; gate (“kids”) off for another DURATION + CHANCE, then another situationship, producing yet another kid.
"Alimony": The REMARRY cycle repeated twice
"Mormon" Mode—BEGIN is ignored; Negative CHANCE ignored; Kids (gates at output) are produced forever.
"FAITHFUL" Mode: after BEGIN gate or trig, the wife gating module goes through the entire situationship, regardless of what happens at the BEGIN INPUT. A new situationship can only begin again after existing has run its course.
"TIGER": BEGIN rising edge always starts everything over. MORMON mode is ignored (celeb is not MORMON) but not the other modes; if unit is set to MORMON and TIGER you really get a re-triggerable ONE AND DONE just like in real life, plus the module costs 15% more every time you build it.
KIDS alternates states--one relationship you have a KID, next one you don't, third one you do, and so on. Something like that?
EOC: End of cycle. 200ms trigger is fired at the end of each situationship. Note: mvcl says to rename this "polyamory" because you could plug "EOC" into other units and have several run at once. Maybe, but "EOC" fits better on the panel.
KIDS: What the situationship produces....for synthesizers, a +5V gate out, Elmo. Less work.
....then used ChatGPT to create a photo-realistic image of what the finished build might look like--the fake photo you see below was created from the front panel PNG above, using a single prompt, took about a minute to produce, and impressively, yielded a pretty good representation of what an 8hp Wife Gate might look like.
W-G FIRMWARE
What next? For Wife-Gating firmware I jettisoned any language that reflected politics, celebrities and religion, and clarified (in my mind) what I wanted the module to do, kind-of sort-of.
Using Claude Code, I first described wife-gating's "duration" and "chance" features, compiled, and uploaded the nascent code to the ATTINY1616 experimenter's board via Arduino IDE.
Video for getting Claude Code going is here.
Once that worked--it usually did in 1 or 2 revisions--I added more features, paraphrasing the WIKI into Claude code prompts.
Each time I committed and pushed revisions to Github....the bot made that easy as well....get the code from Github, here.
Going from the WIKI to a what feels like ready-to-use firmware took a few hours; the guy with the Swiss accent has additional fresh idears that could further speed this process (superb video series from Mr. Spiess--using AI to create firmware--begins here).
How much time would it have taken me to write the W-G's code? Hard to say, but I'd guess a few days. And, reviewing the quality of the code produced, Claude kicked my ass; its comments were clearer, safeguards were better thought out, variables more clearly named. The code looked like a pro wrote it, as opposed to--code written by me.
Here is ChatGPT's idea of what the finished hardware might look like:
![]() |
The firmware "works" but I am not sure going from WIKI to firmware, without better advance planning, was the best way to do this. |
BEFORE PROCEEDING: THE BLOG'S SPONSOR
DIWHY FIRMWARE IN THE AI AGE
Let's say my boss tells me to create 100 unique PCB's a day to maximize shareholder profit (albeit the shareholder never seems to be me).
I get it--as if we weren't working hard enough already: with fantastic AI tools available I see management expecting a lot more output from everyone.But cranking out more product is not applicable for self-educators.
I got started with AudioDiWHY to teach myself electronics and audio fundamentals, which included understanding and getting ahead of coding challenges.
However, in this new AI era, code learning may be gone for good, at least for many of us. Claude Code kicks butt too thoroughly, and even the most curious techs will probably not spend 3 days writing code that Claude could write more elegantly in a few minutes.
I still enjoy doing schematic design and PCB layout, but I figure if creating those by hand is not already obsolete, they will be soon.
Is the future of DiWHY seeing what I can make AI do?
I hope not, because I don't find bossing around Claude much fun, and when bots assist with projects I may learn next to nothing, except perhaps improving my efficiency vis-a-vis my interactions with AI agents.
The existential question becomes: once AI fully moves in, do I continue DiWHY at all?
What is my relationship with this new tech going to look like, really? Here, and in other facets of my life, technical or otherwise?
I will think about this.
I'm hanging in there for now--I will get boards fabricated for the Random Gate and Matrimony projects to see how they work.
If they're turds, fair bet it's my schematic and layout, not the veracity of the bot's firmware.























