We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c871a5c + c60c486 commit 4c64e08Copy full SHA for 4c64e08
src/OpenBikeSensorFirmware.cpp
@@ -237,7 +237,6 @@ void setup() {
237
// Configure button pin as INPUT
238
//##############################################################
239
240
- pinMode(PUSHBUTTON_PIN, INPUT);
241
pinMode(IP5306_BUTTON, OUTPUT);
242
digitalWrite(IP5306_BUTTON, LOW);
243
pinMode(BatterieVoltage_PIN, INPUT);
src/utils/button.cpp
@@ -26,7 +26,7 @@
26
#include "variant.h"
27
28
Button::Button(int pin) : mPin(pin) {
29
- pinMode(pin, INPUT);
+ pinMode(pin, INPUT_PULLDOWN);
30
mLastStateChangeMillis = mLastRawReadMillis = millis();
31
mLastState = mLastRawState = read();
32
}
0 commit comments