#define LED 13
#define bouton 8
void setup() {
pinMode(bouton, INPUT);
pinMode(LED, OUTPUT);
// Serial.begin(9600);
// put your setup code here, to run once:
}
void loop() {
bool etatbouton = digitalRead(bouton);
if(etatbouton)
{
digitalWrite(LED, HIGH);
// Serial.print("bouton on");
}
else //(etatbouton == false);
{
digitalWrite(LED, LOW);
// Serial.print("bouton off");
}
// put your main code here, to run repeatedly:
}