How do I use AD4-AD7 on an Arduino Mini?

I'm playing around with an Arduino Mini, and I'd like to use the additional analog inputs AD4, AD5, AD6 and AD7.  I tried initializing them as inputs and outputs using pinMode and writing to the outputs using digitalWrite, but nothing seems to happen.  Is there something more I need to do?

Thanks - I'm somewhat new to Arduino and still a programming n00b.

EDIT:

OK, I repaired my board such that AD4 and AD5 are outputs, and AD6 and AD7 are analog inputs. AD4 and AD5 seem to be working fine now.

More trouble with the AD6 and AD7, though. I'd like to see what value these ADCs are producing, so I used serial.println() to send the value back to the computer. However, when I run this line of code, it causes the Arduino to hang. What's going on here?  serial.println() works fine for sending back text and other variables, why is it having trouble here?

4 answers
Jul 21, 2010. 12:49 PMmaewert says:
I have no direct experience using the ArduinoMini, but I did want to point out a few blurbs from www.arduino.cc/en/Guide/ArduinoMini: ------------------------------------------------------------------------- Information about the Arduino Mini The microcontroller (an ATmega168) on the Arduino Mini is a physically smaller version of the chip on the USB Arduino boards, with the following small difference: There are two extra analog inputs on the Mini (8 total). Four of these, however, are not connected to the legs that come on the Arduino Mini, requiring you to solder wires to their holes to use them. Two of these unconnected pins are also used by the Wire library (I2C), meaning that its use will require soldering as well. ----------------------------------------------------------- I assume that you soldered pins into the empty holes for these signals :-) and that you properly selected 'ArduinoMini' as the target hardware in the development environmenet. This should make these pins accessable to the software. Good Luck, Mark

Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!