Ceci est une ancienne révision du document !
Coop
- Porteur du projet : Clément Veiluva
- Fichiers utiles : mettre un lien vers un code ou un fichier
Note d'intention
Actionner un rideau electrique via un tapis interrupteur pour montrer un carré de bois, peint en or.
Références et liens
- Notez ici les références artistiques et techniques, ou autres influences
Notes techniques et matériaux
- Rideau electrique
- arduino
- relai
- tapis sensitif diy (bouton push)
Code simple pour arduino un bouton active un relai
const int buttonPin = 2; // the number of the pushbutton pin const int relai = 4; // the number of the LED pin // variables will change: int buttonState = 0; // variable for reading the pushbutton status void setup() { // initialize the LED pin as an output: pinMode(relai, OUTPUT); // initialize the pushbutton pin as an input: pinMode(buttonPin, INPUT); } void loop() { // read the state of the pushbutton value: buttonState = digitalRead(buttonPin); // check if the pushbutton is pressed. If it is, the buttonState is HIGH: if (buttonState == HIGH) { // turn LED on: digitalWrite(relai, HIGH); } else { // turn LED off: digitalWrite(relai, LOW); } }
Photos et médias
Code pour afficher les images du projet :
{{gallery>?&crop&lightbox}}