ubitxv6/push_button.cpp
2020-04-25 11:47:11 -07:00

11 lines
235 B
C++

#include <Arduino.h>
#include "pin_definitions.h"
#include "push_button.h"
bool IsButtonPressed()
{
//Button has a pullup, so it reads high normally,
//and reads low when pressed down
return !digitalRead(PIN_ENC_PUSH_BUTTON);
}