I have a Boarduino with the Atmega 168 chip. I've run the blinky apps and had newbie fun with it, using the Arduino software and serial TTL/USB cable. I'm running Kubuntu Hardy Heron.
Up until recently, I've solved all the usual problems I initially had with it.
However, I could not seem to address the analog ports. I've run several example sketches but no go, including the "AnalogInput" one. I have selected the Diecimila board and played around with other board choices that also use the 168 chip, but still no go.
I note that the pin selections from the Diecimila board do not match my Boaruino. For instance, the example sketch AnalogInput uses pin 2; I've tried that, and I've tried all the analog input pins on the chip, 28, 27, 26, 25, 24, and 23 So I have chosen the pin numbers directly from the chip.
So this is what I found out after struggling for hours: In one instance, when the Sketch directs the LED output to "pin" 13, it actually does go to pin 13. However, when it directs the input to pin "2", it is not talking about a "pin" but a port. Therefore, I should not direct the Sketch to "pin" 24, etc., but to "Analog1" which corresponds to pin 24 on the chip itself.
In other words, the instructions switch, for no apparent reason, from addressing actual pins on the chip to addressing ports on the chip.
So I'm writing this for fellow newbies who might have to discover this the hard way like I did. I'm sure these issues are buried in some FAQ somewhere but I did not catch it and I did quite a bit of searching otherwise. Besides, one does not look for something one does not suspect!