4

I'm playing around with a SparkFun Redboard (essentially, an Arduino UNO).

I have a simple 5V sensor that I'd been trying to get to work with A2 and analogRead(). Nothing seemed to work. It's supposed to be cycling from 0 to 5V, which should give me values from 0 to 1023, and instead I get constant values of around 260.

In desperation, I tried using other ports. On A0, A1, and A3 I get the signals I expect. On A2, still nada.

So, the question. Is there something I could have done in configuring things that would have made A2 and only A2 stop reading correctly? If so, how can I reset it?

Or is there some other function that I might be using that could interfere with A2? Currently, I'm only using Serial over USB - could that interfere with A2?

Or could I simply have fried the port?

asheeshr
  • 3,837
  • 3
  • 25
  • 61
Jeff Dege
  • 161
  • 3
  • Do you have an LED and resistor near you? Try blinking it using A2. – asheeshr Mar 07 '14 at 06:53
  • This is a very long-shot, but have you tried connecting all the other analog pins to ground while testing A2? Floating analog pins can sometimes cause problems (although it seems very unlikely in this case). – Peter Bloomfield Mar 07 '14 at 09:31

1 Answers1

2

I wrote a simple program that used all six analog pins as digital outputs, and wired up an LED. All of the pins except A2 would blink the LED. So yes, it is fried. Thanks.

Jeff Dege
  • 161
  • 3
  • The Redboards use soldered TQFP ATMega328, so unless you're interested in doing a SMT hot-air rework to replace the microcontroller, you're stuck with a dead pin. Luckily it could've been worse. – WineSoaked Mar 09 '14 at 17:45