Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Arduino Candle Snuffer
- //Extremely simple code
- //See images of the candle snuffer at
- const int FAN = 4;
- const int BUTTON1 = 2;
- void setup(){
- pinMode(FAN, OUTPUT);
- pinMode(BUTTON1, INPUT);
- }
- void loop(){
- while (digitalRead(BUTTON1)==LOW){
- digitalWrite(FAN, HIGH);
- }
- digitalWrite(FAN, LOW);
- }
Advertisement
Add Comment
Please, Sign In to add comment