Go Down

Topic: analogRead(pin) bug, succession wrong (Read 1 time) previous topic - next topic



i dont know if this is already mentioned somewhere
but using analoRead(pin), the numbers are upside down regarding the pin numbers on the board.
analogRead(0) reads physical analog in pin 5
analogRead(1) reads physical analog in pin 4
analogRead(2) reads physical analog in pin 3
analogRead(3) reads physical analog in pin 2
analogRead(4) reads physical analog in pin 1
analogRead(5) reads physical analog in pin 0




It's a known problem, explained in the FAQ (why am I getting garbage data from analogRead()): http://arduino.berlios.de/index.php/Main/FAQ

It will be fixed in release 0003 of the Arduino software (coming very soon).

The original Arduino boards had the pins numbered in the opposite order, and the software was kept unchanged for compatibility with the old boards, but now that there are so many more boards with the numbering, the software will be updated to that scheme.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131