My first Arduino forays

Development on Fedora Linux

I have twice set up a development system for the arduino on Fedora, and both times it was tricky. You would think that an open source project like the arduino would just work smoothly on an open source platform like linux, but my experience has been otherwise.

With Fedora 14 and later, just do:

yum install arduino
See my specific notes on Then we move on to the first of many ...

Issue 1 - Blink demo compiler bug

It wouldn't be so bad, except that the traditional demo to start any new embedded programming project is the "blink an LED" project. It is as traditional as "Hello World" in the world of conventional programming. So to start a new system with uncertain development tools and hardware with a buggy trivial demo is disheartening and discouraging.

I spent most of a day chasing irrelevant things because the blink demo would not blink (the LED would just stay on after the image downloaded). Of course, I assumed this was my fault, being new to all of this. It turns out this is or was some kind of bug in the AVR compiler chain:

When I introduce an spurious global variable, it all works fine.

There is evidence that a fixed version of the compiler has been placed among the Fedora 15 packages.

Issue 2 - Yet another compiler bug

Some years ago I went through a nightmare project with PIC controllers and a horrible buggy C compiler. If Arduinos are like that was, I will be out of here pretty quickly. For details on this one, see this link.

Issue 3 - avrdude: stk500_recv(): programmer is not responding

This is an exceedingly cryptic (and common) error. What it means is that the communication link to the Arduino is not doing what it is supposed to.

The stk500_recv() part of the error is stupid and irrelevant and can safely be ignored. This message is coming from the avrdude program, stk500_rcv is some function in that program that we don't care about, and all we do care about is that the "programmer" is not responding.

The message is additionally confusing because to most peoples way of thinking we don't have a programmer. But the avrdude programmer is treating the arduino as a programmer (or if you look at it another way an arduino has a built in programmer), so this is the message you get.

The first time I got this error, I deserved it. I was ignorantly trying to use IO pins 0 and 1 for my own purposes, which you cannot do if you are also using the USB (as you essentially always will be with an arduino), so there you are. Move my IO to pins 2 and up and everything is fine.

Subsequently, I began getting this error for unpredictable and unknown reasons, which ultimately turned out to be:

Issue 4 - bad hardware

Before I describe what was wrong with my Duemillanove board, I will tell you about a trick that is sometimes recommended to fix things when an arduino gets in some mess and cannot respond as a device programmer. It seemed to fix my problem once, but I think that was just coincidence.
The following "rain dance" style fix may be useful when you have an arduino that keeps giving the stk500_rcv error: Now to describe my bad hardware. The clue was that pressing the reset button seemed to do nothing. If I had code running, and pressed the button, it just kept on running. I thought this button was some unique and weird button special to the arduino. I was wrong. I got the duemillanove schematic and probed around and discovered that the button itself was fine, but that it was not connected to the reset pin on the ATmega328 chip. I soldered on a little wire to connect it up, and voila! All of my problems went away. Well, all of my recent stk500_rcv error problems anyway.

There are quite a few reports on the forums about faulty arduinos, so it certainly pays to be suspicious on these lines. I am told that manufacturing may soon be moved from Italy to China, so we can expect a dramatic improvement!


Feedback? Questions? Drop me a line!

Tom's Computer Info / tom@mmto.org