Warning: Not for the Arduino Code Purists out there ![]()
I've been using GPT along with Code Copilot for about a month now. My programming level is very, very basic with only general knowledge of code and concepts surrounding it. I found the experience quite similar to working with a human programmer but with some pitfalls as well.
Some of my experience so far... Most important thing I have learned is for anything beyond simple sketches with only an .ino file, (i.e. multiple .h's) ask AI to put 5 character checksums at the bottom of each file it sends to you. I keep a version list in excel to keep track of each change with the checksum of the changed .ino or .h file.. This allows me to easily search the chat to find the code for the correct version. For example:
case SystemState::Shutdown: return "Shutdown";
case SystemState::ColdStart: return "ColdStart";
default: return "Unknown";
}
}
};
#endif // SYSTEMSTATES_H
// Checksum: 9D4F1
The second most important thing is when AI sends new code to implement, always ask for it to send a full and complete version based on the last version as a baseline. Here an example:
AI: Let me know if further adjustments are needed!
Me: after compiling now more copile errors. use Checksum: B97C2 as codebaseline
or even better, just send the full code of the last file discussed and ask AI to use it as a baseline when making changes.
AI (at least GPT and Code Copilot) is able to understand the purpose of checksums and can find them in the chat, or retrieve a particular piece of code that has the requested checksum.
I learned the hard way that AI often forgets previous features when creating new script versions and lots of rabbit holes. Using the checksum and keeping a version list really helps...
I'll add more as I continue, but would be interested if anyone else using AI to program Arduino have any experiences and tips to share.
Bottom line for me is that using AI has allowed me to create quite large and complex projects for Arduino, far far beyond my programming skill level.
Thx all!


