O'Reilly logo

Getting Started with Arduino by Massimo Banzi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Troubleshooting

There will come a moment in your experimentation when nothing will be working and you will have to figure out how to fix it. Troubleshooting and debugging are ancient arts in which there are a few simple rules, but most of the results are obtained through a lot of work.

The more you work with electronics and Arduino, the more you will learn and gain experience, which will ultimately make the process less painful. Don’t be discouraged by the problems that you will find—it’s all easier than it seems at the beginning.

As every Arduino-based project is made both of hardware and software, there will be more than one place to look if something goes wrong. While looking for a bug, you should operate along three lines:

Understanding

Understanding

Try to understand as much as possible how the parts that you’re using work and how they’re supposed to contribute to the finished project. This approach will allow you to devise some way to test each component separately.

Simplification and segmentation

The Ancient Romans used to say divide et impera: divide and rule. Try to break down (mentally) the project into its components by using the understanding you have and figure out where the responsibility of each component begins and ends.

Exclusion and certainty

While investigating, test each component separately so that you can be absolutely certain that each one works by itself. You will gradually build up confidence about which parts of project are doing their job and which ones ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required