Advertisement
B-Matt

Arduino - Ventilator

Nov 25th, 2016
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.16 KB | None | 0 0
  1. void setup() {
  2.   pinMode(8, INPUT_PULLUP);
  3. }
  4.  
  5. void loop() {
  6.   if(digitalRead(8) == 0) {
  7.     analogWrite(11, 255);  
  8.   } else {
  9.     analogWrite(11, 90);
  10.   }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement