라벨이 Arduino AI coding인 게시물 표시

Building an LLM Robot with My Son — EP 2. First AI Coding Experiment — Context Strategy Changed Everything

Building an LLM Robot with My Son — EP 2. First AI Coding Experiment — Context Strategy Changed Everything My son gave his first AI coding command that evening. He sat down in front of the laptop, thought for a moment about what to type, and entered this: "stop if there's something in front of it" Claude Code produced code. He skimmed it — couldn't tell what most of it meant. "Can I upload it?" We uploaded from Arduino IDE. He put his hand in front of the robot. It didn't stop. "Why isn't it working?" I looked at the code. Claude had assigned the HC-SR04 Trig pin to pin 2. Our wiring uses pin 4. The CLAUDE.md context hadn't loaded in this session — he'd opened a new Claude Code session, and in that session there was no project context. That one moment is the whole point of this episode. What Happens When AI Writes Embedded Code Without Context HC-SR04 is a well-known ultrasonic sensor. Claude knows how it works — pulse ...

Building an LLM Robot with My Son — EP 1. Designing the AI Coding Agent Harness

Building an LLM Robot with My Son — EP 1. Designing the AI Coding Agent Harness There was a day when I first asked Claude Code to write robot code. "Write Arduino code to control two DC motors with PWM using an L298N motor driver. IN1 on pin 8, IN2 on pin 9, ENA on pin 10. IN3 on pin 11, IN4 on pin 12, ENB on pin 13." The code came back clean. But when I tested it, the motors behaved wrong. ENA was assigned to pin 10, and internally the code was touching Timer1 — which was conflicting with the Servo library I had running. The error message was vague. It took two hours to find the cause. Claude didn't know I was also using the Servo library. It didn't consider the relationship between pin 10 and Timer1 in the context of my setup. As generic code, it wasn't bad. It just didn't know my project. That one bug was enough to reach the conclusion: you can't just use a generic AI coding tool as-is. What Breaks When You Use Generic AI Tools for Embedded Proje...