0

5 Easy Mistakes to Make – and Fix! – When Programming for #Arduino

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.

5-common-arduino-programming-mistakes

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

Read more.


Make a robot friend with Adafruit’s CRICKIT – A Creative Robotics & Interactive Construction Kit. It’s an add-on to our popular Circuit Playground Express, FEATHER and other platforms to make and program robots with CircuitPython, MakeCode, and Arduino. Start controlling motors, servos, solenoids. You also get signal pins, capacitive touch sensors, a NeoPixel driver and amplified speaker output. It complements & extends your boards so you can still use all the goodies on the microcontroller, now you have a robotics playground as well.

Join 7,500+ makers on Adafruit’s Discord channels and be part of the community! http://adafru.it/discord

CircuitPython in 2018 – Python on Microcontrollers is here!

Have an amazing project to share? Join the SHOW-AND-TELL every Wednesday night at 7:30pm ET on Google+ Hangouts.

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Follow Adafruit on Instagram for top secret new products, behinds the scenes and more https://www.instagram.com/adafruit/


Maker Business — Despite multiple bankruptcies, RadioShack continues to find ways to keep the lights on

Wearables — Molding with glue

Electronics — A way around surface mount snags

Biohacking — Biohacking : tACS Transcranial Alternating Current Stimulation Demystified

Python for Microcontrollers — Help bring CircuitPython to other languages!

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at AdafruitDaily.com !



No Comments

No comments yet.

Sorry, the comment form is closed at this time.