Debugging and unit testing
with Arduino

I used many discussions
about debugging Arduino code, and frankly they almost always end with
“print statements and the serial monitor”.

Honestly I think that
whatever happens the serial monitor will be the king of the debugging
tools. That is so because debugging an Arduino program may seem
simple at first hand but it is actually a complex tasks.

If you look at the picture
below you’ll see all the involved components of an Arduino “end
product’”. I say end product because there are no “build tools”
or “debug tools”.

This series of posts is
only about the green part. Your code.

But if your code is only
such a small part of the whole project ….. why would you bother?

Look at the image below ….

As the image above shows:
“your code”, “your electronics” and “your mechanics” may
be the smallest part of the project but it is also the only non
debugged part. So errors are most likely in “your ***”.

The better each of “your
***” parts is debugged and understood the better chance your
project has to be a success.

This series ofpots wants
to show you a way to improve “your code” in ways you may not have
considered possible before. Namely debugging and unit testing.

If you want me to show you how … please post

Jantje