strange analog input? Wierd...

So you guys are saying that analogRead() refers to bottom pins (analog strip ) and digitalRead() refers to the higher strip (PWM)

Exactly right.

BUT! You can use the analogue pins ("bottom pins") as digital I/O pins (as RetroLefty said earlier), though you can't use the digital pins as analogue inputs.

[edit]The Mega also has 16 analog input pins numbered 0-16.[/edit]
He meant 0..15.

He meant 0..15.

Yes he did.. :wink:

Lefty

The pin labelling on the Mega doesn't help. It should be a rule that noobs start with a Duemilanove..... :slight_smile:

You can use a 100 R resistor to jump 5v or ground to an input pin (a piece of wire would work as well) but don't use it as a pull up/ down resistor shorting the pin the opposite way to change its state (or using it on a digital output pin). Its likely to cook something. 10k is a good value for pullup / pulldown use. It won't cause excess current to flow when you get it wrong.

great! I've to buy some resistors and stuff to learn now.
BTW, i purchased the mega because i was worried that the duemilaenove was getting old and unsupported...
Obviously I was missing the point of an open source platform!
Thanks again!

Well the Mega is not a bad board to have :wink:

You will have to be aware of several pin number changes from the more standard board, esp for the many dual purpose pins (I2C, etc). That means many of the user library contrubutions won't work without some minor changes to the sketch to allow for the differences that the AVR1280 chip has.

Lefty