Dotto, part 13: starting over on the hardware

I'm redoing the hardware and the firmware from scratch. Dotto stays, and so do the dots, the CRT look, the C++ core, the simulator and the tests. The home assistant has to work differently. I haven't picked a board.

I’m going to redo the hardware and the firmware from scratch. This part covers what that means, what I’m keeping, and what I don’t know yet.

The awkward bit first: I haven’t picked the next board. Part 12 is a list of reasons the Elecrow CrowPanel 2.1 fell short, mostly impressions, with nothing measured. Starting over on that basis is a decision and not a conclusion, and I’d rather it were labelled as one.

What stays

  • Dotto and the Pip engine. The character remains the mascot. His body, his poses and his scenes live in the shared core, not in the code of any one board.
  • The dots and the CRT look. The dot grid, the Doto typeface, the fringe and the scanlines stay as the identity. The reason I doubt them on the CrowPanel is the panel, which comes up below.
  • The C++ core, the simulator and the tests. The core is shared between boards, the SDL simulator runs the same code, and the screen test compares 95 reference images on every push. Of everything built here, this is what made the second board take twenty minutes.

Why the change of board was cheap

The numbers for the Elecrow CrowPanel are in part 11: one new file for the board, a size that became a per-board constant, a glass offset with a calibration, and a shared input grammar. Four commits in about twenty minutes, and the screens at the old size didn’t change. The 1.43 took two days, 25 and 26 November (part 8).

That is the argument for the structure, and for the next move. If the board is the part that changes, the work worth protecting is the part that doesn’t.

What changes: the hardware

I don’t know which board comes next. I do know what the second one taught me to ask of a candidate, and each item comes from something that went wrong:

  • A display that can show black. The whole design stands on it (part 9).
  • A glass that sits on the pixels. A calibration screen that exists because the glass is 20 px off is a symptom.
  • A dial I can judge before I buy it: its detents and its response, not only its pins.
  • Feedback that isn’t only the screen. The 2.1 has no motor and no speaker, so a gesture is answered by pixels or not at all.
  • The sensors the 1.43 had and the 2.1 lacks: an IMU, a battery, audio.

I’d check the first four before writing a line of firmware: a photograph of the black in a dark room, a touch at the centre and at the edge, a dial in the hand. I skipped all of those on the 2.1.

What changes: the home

This is the part I know least how to write. The spec of 23 November (part 5) says the device works on its own with the home WiFi and talks to each lamp brand through its local API. It also lists, under “outside v1”, Home Assistant.

I now treat Home Assistant as a question with two meanings. One is the software, with its integrations and protocols. The other is the home assistant in the loose sense: the thing that knows the lights, the music and the room, with Dotto as its face. I have no answer to either yet, only the evidence for why the old arrangement is costly.

The firmware carries every integration itself: Hue through a discovery and a button press on the bridge, WiZ over UDP, Govee’s LAN interface, Spotify with a login flow, the CDJs with their own network habits. The commits of the last few days read like the bill. One fixes a Hue bridge that was found while its lights weren’t (c885189). One drops the Govee step when no Govee lamp answers (33acb47). One gives the board a second, link-local address because the CDJ never asks for one by DHCP (3f3a8f5), and the plan to make Dotto a link source was parked. And on the first board the internal RAM ran out before the tasks started (part 8).

I’m not saying Home Assistant makes that bill go away. I’m saying that five integrations in the firmware of a small device was a choice I made on the first day, with no board in hand, and it deserves to be made again now that I have one. The questions I want answered before the design is drawn:

  1. What must Dotto still do when the rest of the system is off?
  2. Which jobs belong on the device, which on a hub, and which in Home Assistant?
  3. What does the display need to show, once it isn’t the only way to reach the lights?

Where it stands

The browser prototype stays frozen, the C++ core stays, and the next board is undecided. I’ll write the next part when I have a candidate and a photograph of its black.