Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int sensoreP = 2;
- int motB = 3;
- void setup() {
- pinMode(sensoreP, INPUT);
- pinMode(motB, OUTPUT);
- }
- void loop(){
- digitalWrite(motB, HIGH);
- delay(2000);
- while (digitalRead(sensoreP) == 0) {
- digitalWrite(motB, HIGH);
- }
- digitalWrite(motB, LOW);
- delay(20000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement