I have 3 buttons connected to D09, D10, D11 to read one of 7 states I want my project to be in. I can read from D09 and D10 just fine, can't seem to read from D11. The code from my project where the buttons are setup is as follows.
#define BUTTON1_PIN 9
#define BUTTON2_PIN 10
#define BUTTON3_PIN 11
#define BUTTON_DELAY 20
void setup() {
pinMode(BUTTON1_PIN, INPUT);
digitalWrite(BUTTON1_PIN,HIGH); // pull-up
pinMode(BUTTON2_PIN, INPUT);
digitalWrite(BUTTON2_PIN,HIGH); // pull-up
pinMode(BUTTON3_PIN, INPUT);
digitalWrite(BUTTON3_PIN,HIGH); // pull-up
Serial.begin(9600);
strip.begin();
// Update the strip, to start they are all 'off'
int i;
for (i=0;i<strip.numPixels(); i++){
strip.setPixelColor(i,Color(225, 128, 0));
}
strip.show();
}
// then the area where I read the buttons.
int button_pressed = 0;
// Some example procedures showing how to display to the pixels
boolean button1_pressed = handle_button1();
if (button1_pressed){
button_pressed += 1;
}
boolean button2_pressed = handle_button2();
if (button2_pressed) {
button_pressed +=2;
}
boolean button3_pressed = handle_button3();
if (button3_pressed) {
button_pressed +=4;
}
Serial.print(button_pressed);
switch(button_pressed) {
some code...
Do I have to do something special to use D11?
Thanks
Mike

