Learning about the Arduino toolchain

The question “What does Arduino mean?” is rather important. Even more so, in the light of the ongoing Arduino vs. Arduino conflict. But, what would Arduino without “Arduino” mean? Discussing the technical aspects of this question was the topic of the meetup yesterday. While you may be using “Arduino” to label some electronic components, Arduino also means software, libraries, a user experience and a community.

Assuming Arduino means something to blink a LED, Elliot Williams gave his view on tinkering with 8-bit AVR microcontrollers. Elliot is author of the book “AVR Programming - Learning to Write Software for Hardware” and a contributor to the Hacakday blog.

Before discussing blinking LEDs, Elliot had some general advice for Arduino beginners.

First, always include a slider or potentiometer in your electronic projects. The moment will come when digital 0’s and 1’s are not enough to make your users happy. And you better think about analog inputs soon.

The second advice was to solder a resistor on a LED for learning purposes. With this “LEDresistor”, you can easily try out pin functions of a microcontroller. Now, you can plug this component easily into any board or try out software, with or without “Arduino”.

led resistor

In the main part of this talk, he showed us a bit of reverse engineering of the Arduino IDE. For example, on how to log everything with a script when you press the compile and upload buttons. The IDE basically wraps a GCC build process, and it is not too difficult to build some blink code from scratch.

However, the question now is: Why you would like to tinker with “Arduino”? The Arduino IDE does its job quite well. Being able to run the tools yourself, gives you a bit smaller code but at a cost of a rather bulky, complicated setup.

But knowing your tools has advantages too. If you have to flash many boards for example, you could use a custom build script to include things as serial numbers. And, you can configure code for different devices easier. Portability to other hardware (e.g. ARM based chips) might be another reason to start a custom build process. And, last but not least, you finally could learn “real” C programming instead of the “.ino” programming style from “Arduino”. Knowing your build tools can also influence you working with an IDE. For example, you can more easily include arbitrary C code in your Arduino projects.

Now, get a LED and try to get it blink. And then, judge for yourself, what “Arduino” stands for!

Thanks Elliot for the talk and MuMaLab for hosting the meetup.

References