
La bibliothèque requise dépend du module micro utilisé.
int Led = 13 ;
int buttonpin = 7;
int val = 0;
void setup () {
pinMode (Led, OUTPUT) ;
pinMode (buttonpin, INPUT) ;
}
void loop () {
val = digitalRead(buttonpin);
if (val == HIGH) {
digitalWrite (Led, HIGH);
} else {
digitalWrite (Led, LOW);
}
}
No downloadable resources added yet.
Veuillez vous connecter pour commenter.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis !