Hi All, I recently bought my first Arduino (an Uno R3) and I have just been playing around with it today when I stumbled upon a problem.
I was trying to get the Analog In pins to behave as digital outputs. I found that only the A0 pin will behave as a digital out.
I uploaded the following sketch:
void setup(){
pinMode(A0,OUTPUT);
pinMode(A1,OUTPUT);
pinMode(A2,OUTPUT);
pinMode(A3,OUTPUT);
pinMode(A4,OUTPUT);
pinMode(A5,OUTPUT);
digitalWrite(A0,HIGH);
digitalWrite(A1,HIGH);
digitalWrite(A2,HIGH);
digitalWrite(A3,HIGH);
digitalWrite(A4,HIGH);
digitalWrite(A5,HIGH);
}
void loop(){
}
and measured voltages (with a multimeter) between each Analog pin and the GND. The only pin outputting +5V was the A0.
I also tried replacing A0,A1 ... A5 with 14,15 .. 19 etc, like so
pinMode(14,OUTPUT);
digitalWrite(14,HIGH);
and again, only the A0 pin seems to be working.
Any ideas?
Cheers.