Quantcast
Channel: Seeedstudio Forum
Viewing all articles
Browse latest Browse all 6612

Xadow mainboard---infor on address and name for WAKE button

$
0
0
Image ,Can you try like this example ?you can get button state on the serial monitor.



// set pin numbers:
const int WAKE_Pin = 10; // the number of the pushbutton pin


// variables will change:
int buttonState = 1; // variable for reading the pushbutton status

void setup() {
pinMode(WAKE_Pin, INPUT);
Serial.begin(9600);
}

void loop(){
// read the state of the pushbutton value:
buttonState = digitalRead(WAKE_Pin);

// check if the pushbutton is pressed.
// if it is, the buttonState is LOW:
if (buttonState == LOW) {
Serial.println("Button is pressed");
}
else {
Serial.println("Button isn't pressed");
}
delay(100);
}

Statistics : Posted by csbeng • on Sun Jan 04, 2015 1:32 pm • Replies 2 • Views 390

Viewing all articles
Browse latest Browse all 6612

Trending Articles