logoalt Hacker News

mikewarotyesterday at 7:11 PM2 repliesview on HN

I've been vibe circuit building since the 1970s, but that's not what this is about, is it? ;-)

Years ago, at Pumping Station One in Chicago, I watched someone struggle with the driving of multiple LEDs from an Arduino in his project. He wondered why the LEDs got dimmer when more than one was lit.

I looked at the original schematic, and what he had built, and noticed a difference. The original design had a resistor on each LED, but he had decided that was a redundancy and refactored it to use a single LED instead. In the case of current flow, this meant the circuit still worked, but that current limiting that resistor provided now was shared across every active LED, leading to the progressive dimming as more LEDs were active.

It turned out his background was in software, where the assumptions are much different as to what is important. Cutting out redundant code is an important skill.

I saw it as a cognitive impedance mismatch being played out in real life.

I assume the same is true for an LLM/AI attempting the same leap.


Replies

quadratureyesterday at 7:55 PM

Had this same experience back when I first learned to program a PIC microcontroller. You really shouldn't be driving LEDs directly off IO pins anyways. I think the digitalness of IO pins also lends itself to not thinking about the underlying circuitry and coming at it from a software lens.

show 1 reply
petefordeyesterday at 7:32 PM

I actually had this exact scenario come up last week except that in my version it warned me to make sure that I added a resistor to each LED to keep brightness normalized.

I didn't happen to need this particular advice, but it stuck in my head as something that would potentially save someone learning a lot of pain.