Skip to content

Commit

Permalink
fix setting pin mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Breitlauch committed Mar 8, 2024
1 parent c67c33b commit 3f90809
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions usermods/Distance_Staircase/Distance_Staircase.h
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,11 @@ class Distance_Staircase : public Usermod {

if (!enable) {
state.set(Reset);
} else {
pinMode(topPIRPin, INPUT_PULLUP);
pinMode(bottomPIRPin, INPUT_PULLUP);
pinMode(triggerPin, OUTPUT);
pinMode(echoPin, INPUT);
}
enabled = enable;
}
Expand Down

0 comments on commit 3f90809

Please sign in to comment.