Le blog de numerunique

With—and beyond—AI's help
20/03/2026

The last project on detailed instantaneous power consumption relied heavily on AI's help—definitely not a surprise for today's projects in general. Yet it couldn't have been done by AI (Grok in this case) alone. Here is a feedback about what worked and what didn't.

numerunique acquired its first Tiny2040 on 30/11/2021. Since then, it lurked on numerunique's lead programmer's desk, silently shouting "Use me! You'll see I'm worth it". But as usual with a side project not sponsored by a customer, it waits. It must be noted that using the RP2040 chip is far from easy, starting with the rather discouraging step of reading through its thousands of pages of technical, indigestible documentation. That's where Grok gave the utmost welcome help, providing insights that would have required months of tedious work.

Grok was first consulted about it on the 04/04/2025. The screenshot above shows its very first answer. At the bottom of it there is the sentence "Wiring: Connect each meter’s S0 output (two wires: S0+ and S0-) to an input pin on your counter hardware.". A year later, that statement makes you smile…

During that first chat about the project, a hint was given to Grok about using Cat 6 Ethernet cables to connect the MID meters.

Almost one year later, Grok provided the same idea. It really looks like it learned it!

Yet Grok also suggested the use of Dupont wires to connect the MIDs to the Tiny2040.

That suggestion proved to be a very smart one. Additionally, but it was overlooked at the time, Grok hinted at crimping the Dupont connectors. Crimping was not a skill known at numerunique but it proved to be decisive. Sadly, Grok couldn't do the actual crimping. That current limitation to access hardware is well known. Maybe Optimus would handle it later?

Grok's help was far less efficient on software acute problems. The most spectacular failure was on code review. Grok stalled on false claims about critical bugs.

The best example showing what was behind it is this custom SQL call:

Grok spotted the missing ' around the %s that is definitely a string value. This is a very common issue and Grok, relying on the knowledge of countless number of bug reports highlighted it at once, without making any enquiry about the rsql() function.

Indeed this rsql() is a custom call written by numerunique that mimics the printf() principle of a variable list of arguments, provided either as number (%d) or string (%s). The latter should always be surrounded by ' which is automatically done by rsql(), saving (among other things) the need to type two single quotes each time a string value is used in a SQL request—numerunique's working style is based on minimalism.

Another more subtle failure of Grok's help happened on the Tiny2040's code. Grok provided the main required functions, extracted from the heavy Tiny2040 documentation, including the needed gpio_acknowledge_irq(), although it mentioned it seven chats after the initial ISR code suggestion. Yet there was a caveat in the ISR initialisation. It is possible to register only one ISR for all GPIO pins: it is done for the first one with gpio_set_irq_enabled_with_callback(). Then you must use gpio_set_irq_enabled() for the others.

That caveat led to one of the worst kinds of bugs: the kind that happens almost every time but always silently. To make things worse, debugging Tiny2040's code is especially hard: there is no gdb available nor even syslog() facilities!

This bug was fixed, with decisive Grok's help, by the seasoned developer's technique: stubborn small step tests with debug messages, which were restricted to different shades of blinking of the unique LED of the Tiny2040. The most difficult part was taming Grok which insisted on flooding the chat with unworthy code, eager to have the bug fixed by sheer chance.

The good thing about Grok is that it acknowledged it afterward (when specifically prompted to do so):

The overall impression about Grok's help for this project is that it was truly welcome. Yet it found its limit when it came to innovative features. Currently AI is closer to plagiarism than to true generation.

We are more at the level of API ("Artificial Plagiarism Intelligence") than the AGI stage.


Previous | Next