라벨이 retrospective인 게시물 표시

Four Side Projects with AI, and the Same Wall I Hit Four Times

이미지
Four Side Projects with AI, and the Same Wall I Hit Four Times It was about one in the morning. A half-assembled acrylic robot chassis sat on my son's desk. I'd just uploaded an Arduino sketch that Claude Code had written for two DC motors driven through an L298N H-bridge with PWM. One wheel spun in one direction. The other sat still, twitching occasionally. My son leaned over my shoulder asking "what's wrong with it?" while I stared at the serial monitor. The code was clean. That wasn't in doubt. Standard L298N pattern, library calls in order, PWM values within range. It just didn't work. I looked at the pin map again. IN1 on pin 8, IN2 on pin 9, ENA on pin 10. IN3 on pin 11, IN4 on pin 12, ENB on pin 13. Exactly what I'd given Claude. Two hours later, I figured it out. ENA on pin 10 was driving Timer1, and the same sketch was pulling in the Servo library, which also uses Timer1 on the AVR. They were fighting over the same hardware timer. The co...