mikeleslie
Active member
Perhaps I'm an idiot, but I can't seem to do a basic digital write when using A10. It works fine on the other 20 pins I'm using. Is there something special I need to do? I even tried the blink sketch and just changed 13 to A10...and nada..
Code:
const int ledPin = 13; // the number of the LED pin
const int ledPin2 = A10; // the number of the LED pin
// Variables will change:
int ledState = LOW; // ledState used to set the LED
long previousMillis = 0; // will store last time LED was updated
long interval = 5000; // interval at which to blink (milliseconds)
void setup() {
pinMode(ledPin, OUTPUT);
pinMode(ledPin2, OUTPUT);
}
void loop()
{
unsigned long currentMillis = millis();
if(currentMillis - previousMillis > interval) {
previousMillis = currentMillis;
if (ledState == LOW)
ledState = HIGH;
else
ledState = LOW;
digitalWrite(ledPin, ledState);
digitalWrite(ledPin2, ledState);
}
}