We all do it. We make mistakes. I’d go so far as to say they’re a foundational pillar of learning. And even then we still make them! So I appreciate Bald Engineer acknowledging, then collecting and describing the ‘5 Common Arduino Programming Mistakes‘ that he sees most often in the wild, either while error-checking code written by others or even quality-checking his own code.
Whenever someone sends me some code that doesn’t work, there are a few common Arduino programming mistakes that I check. Some of these mistakes I make myself. In most cases my code will compile just fine. Sometimes, these mistakes won’t generate any compiler error.
When my Arduino code is acting up, these are the first things I check. Here are my 5 common Arduino programming mistakes, I use to debug non-working code.
Bald Engineer breaks these mistakes down into:
- Equals and Assignment
- Float and Integer Math
- Confusing Analog and Digital Pins
- Floating Pins and Mixed Logic
- Array Sizes