Gokino
Learn Arduino with AI
#035 minLesson3_DebugCircuit.ino

Lesson #3: How to Debug a Broken Arduino Circuit & Code with AI

Use a repeatable 3-step hardware debug checklist (LED polarity, off-by-one breadboard rows, missing GND), fix C++ case-sensitivity errors in 1 click with Fix with AI, and isolate faults using Serial Monitor.

Key Takeaways

  • Separate software bugs from hardware wiring faults using Serial Monitor heartbeat logs.
  • Run the 3-step breadboard inspection: LED orientation, same-row pin alignment, and closed GND return loop.
  • Swap to a backup GPIO pin (Pin 8) cleanly by changing one variable: int ledPin = 8;.

Workbench Hardware Kit

  • Arduino Uno R3 + USB-B Data Cable
  • 400-point Solderless Breadboard
  • 2x 5mm Red LED (1 active + 1 spare for swap test)
  • 220 Ohm Resistor (Red-Red-Brown-Gold)
  • Male-to-Male Jumper Wires (Red Pin 12 + Black GND)

10-Second Hardware Challenge

Open Lesson3_DebugCircuit.ino in Gokino IDE, change int ledPin = 12; to int ledPin = 8; and delay(500), move your red wire to Pin 8, and verify both Serial Monitor and LED!