Beginner course · Chapter 5 of 8
The Arduino and AI as Your Coder
Read code you did not write, ask AI to change it, and test the change on real hardware.
This page lists what a learner is able to do at the end of this class. It does not carry the class itself. The lessons, exercises and answers stay in the classroom and in the book.
What you will be able to do
- Wire a sensor to a microcontroller and upload a working sketch
- Read code well enough to follow what it does, without writing it from scratch
- Use AI to explain unfamiliar code line by line
- Ask AI to modify code, then test that change on real hardware
- Treat generated code as unverified until you have run it
What the class is really about
This class puts the two halves of the course together. There is a physical circuit with a sensor in it, and there is code controlling that circuit, and the code is written with AI helping.
The starting point is reading, not writing. You are handed a working sketch and you go through it a line at a time, asking AI to explain anything unfamiliar. That is a genuinely useful skill on its own. Most people who work with technology spend far more time reading code somebody else wrote than writing any of their own.
Then you change it. You describe what you want to happen differently and let AI produce the new version. Then, and this is the part that matters, you upload it to the actual board and find out whether it works.
That loop is the entire point of the class. Code that is only ever read looks correct. Code running on a real device sitting in front of you is either doing the thing or it is not, and there is no arguing with a sensor that fails to respond. AI writes code that looks right considerably more often than it writes code that is right, and running it is the only way to tell those two apart.
This is also where a learner stops being a passenger. Up to now AI has been producing text for you to read. Here it produces instructions for a machine, and you are the one who decides whether those instructions are good enough to use. If it does not work, that is yours to fix.
You also learn what an Arduino is best at compared with a Raspberry Pi, and how a sound sensor decides that a sound has happened at all.
Careful use
Code ownership. Who wrote it, what you should say about that, and why it is still your responsibility.
Careful use is not a separate lesson at the end of the course. A piece of it belongs to every one of the eight classes, and this is the piece that belongs to this one.
How this class is taught
- One core concept. The class carries a single idea. Nothing is covered twice and nothing is rushed.
- Hands before theory. You do the thing first. The explanation lands better once you have seen what happened.
- Practice in company. Weekday slots in the lab follow the weekend class, with somebody there to help.
- Mixed ages at one table. The youngest in a batch may be ten and the oldest past fifty. Each takes something from the other.
Chapter 4, Breadboard Fundamentals · Chapter 6, Building With Blocks