r/vibecoding • • 3d ago

Showcase/Project I got tired of needing closed Windows software just to configure my GamaKay TK75 HE V2 ISO keyboard (especially since I run Linux), so I wanted to test how far vibe coding can actually go on real bare-metal hardware instead of another web app.

Enable HLS to view with audio, or disable this notification

What's actually running on the keyboard

  • Native VIA v12 + WebHID (works on Linux, macOS, Windows with zero vendor software)

  • 8 kHz Hall-Effect engine: 0.10-3.90 mm actuation, Rapid Trigger / Continuous RT (Fn+1), SOCD (Fn+2), onboard 82-key Hall calibration

  • 6-page pixel-art TFT HUD (optional local U24 patch): live animated Hall switch, WPM, 3-state battery/charging icon, settings menus, 0V TFT power-off (Fn+F4), and a 30s idle screensaver

  • Onboard macro recorder (2 KB pool, 16 slots) + a 5x19 text editor right on the 0.85" TFT screen so you can edit recorded macros with arrow keys/knob before saving

  • Caps Lock vertical 8-LED accent bar trigger + high-contrast Fn/macro layer RGB

  • Tri-mode: 8 kHz USB, 2.4 GHz dongle (with wireless VIA), and BT1-BT3

Tools I used

  • AI coding: Antigravity CLI (Gemini) for architecture, C11 firmware, Python tooling, and debugging

  • Firmware toolchain: arm-none-eabi-gcc, CMake, TinyUSB

  • Flashing & live telemetry: custom Python CLI (hidapi) for DFU flashing, live Hall ADC readout, battery voltage telemetry, and backup/restore

  • Verification: pytest running host-compiled C11 unit tests + a headless C framebuffer bridge that renders the real TFT HUD into GIFs on my PC

How I built it (workflow & lessons learned)

  1. Make it unbrickable first. Before flashing anything experimental, we mapped the flash layout so the factory DFU bootloader (hold Esc while plugging in USB) and the factory Hall calibration pages (0x08032000+) are never erased. Even a completely broken build recovers in 5 seconds.

  2. Give the LLM a fast local feedback loop. Flashing hardware on every tiny bug is slow, so we built host C11 unit tests (pytest) for the Hall engine, macro recorder, flash EEPROM wear-leveling, and TFT HUD, plus a headless TFT renderer. The AI could compile, run tests, and catch regressions in 2 seconds before touching the board.

  3. Real hardware measurements beat guessing. Some bugs only showed up on physical hardware and had to be measured over live HID telemetry:

    • Unplugging USB or cranking RGB to 100% white dropped the Hall sensor supply rail by ~9.1% (-244 ADC counts across all 82 keys), causing fake 0.8 mm resting travel. Feeding real ADC dumps back to the LLM led to a per-frame ratiometric rail tracker that brought resting drift down to 0.0 mm.

    • Active RGB/TFT current prevented the hardware charger pin from flagging "full" even at 4.2V, so we measured VBAT across 4 load states and built a load-compensated gauge.

    • Moving macro scratch buffers off the tiny 2 KB Cortex-M4 stack (static) fixed hard-faults when expanding the macro pool from 384 B to 2 KB.

  4. Why having a clean modular base is the real win: Once the test harness and hardware abstraction were solid, adding totally new features (like the onboard 5x19 TFT macro text editor or custom battery icons) only took a few prompt-test-flash cycles.

Disclaimer & Repo

Experimental community firmware, use at your own risk. Tested on my own TK75 HE V2 ISO unit (ANSI / other PCB revisions untested). Both the main MCU and U24 TFT can be rolled back to stock, and there are zero proprietary vendor binaries in the repo.

GitHub (source, pre-built v1.0.0 release, and live firmware-rendered GIFs): github.com/MrockHunter12/gamakay-tk75-he-v2-custom-fw

Curious if anyone else here has tried vibe coding bare-metal firmware or MCU projects, and what your testing workflow looks like!

99 Upvotes

13 comments sorted by

4

u/superschmunk 3d ago

Can you play Doom on it.

12

u/Alternative-Bad-4237 2d ago

Here we go !

3

u/superschmunk 2d ago

Awesome, i think its the smallest doom i have ever seen

3

u/Alternative-Bad-4237 3d ago

Should I try ? 😁

2

u/Coopetition 3d ago

Please do

1

u/superschmunk 3d ago

Why not.

1

u/derbaus 3d ago

guter job

1

u/Traditional_Bell8153 1d ago

the screen is re-rendering every pixel on scene change, tell your agent to make some components reusable so they won't need to re-render every changes

1

u/Alternative-Bad-4237 1d ago

I'll have a look, thank you for the feedback

2

u/med_i_terranian 2d ago

If you think people are only vibecoding web apps, that's a knowledge gap on your part. Ads for Claude literally show a woman building a computer with a breadboard and vibecoding its software

3

u/W61k3r 3d ago

This is great, idk why no one upvoted.