int relais = 10;
int commande = 7;
int x;
void setup (){
pinMode(relais,OUTPUT);
pinMode(commande,INPUT);
}
void loop()
{
x=digitalRead(commande);
if (x==LOW)
{
digitalWrite(relais, HIGH);
}
else
{
digitalWrite(relais, LOW);
}
}





