diff options
| -rw-r--r-- | door_lock/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/door_lock/main.c b/door_lock/main.c index 36c4a37..f3f8b8c 100644 --- a/door_lock/main.c +++ b/door_lock/main.c @@ -39,9 +39,9 @@ int main(void) ISR (INT0_vect) { - if ((PIND & (1 << LOCK_BTN))) + if (!((PIND >> LOCK_BTN) & 0x01)) OCR1A = PWM_MID; - if ((PIND & (1 << UNLOCK_BTN))) + if (!((PIND >> UNLOCK_BTN) & 0x01)) OCR1A = PWM_MIN; } |
