参考
結果
プログラム
//Grove_Button_UNO_1
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin as an output.
pinMode(13, OUTPUT);
// initialize digital pin as an input.
pinMode(14, OUTPUT); //14 = A0
}
// the loop function runs over and over again forever
void loop() {
int a = digitalRead(14);
digitalWrite(13, a); // turn the on (HIGH is the voltage level)
delay(200); // wait for a second
}