File tree Expand file tree Collapse file tree 4 files changed +4
-4
lines changed
Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ void setup() {
3535
3636 // In order to configure a pin as an input, for example the button SW0 at
3737 // PD2, we can do the following:
38- pinConfigure (PIN_PD2, PIN_DIR_INPUT);
38+ pinConfigure (PIN_PD2, PIN_DIR_INPUT | PIN_PULLUP_ON );
3939
4040 // Then we can e.g. attach an interrupt to the button when it is pressed (on
4141 // the falling edge). If we want to have an interrupt when the button is
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ void setup() {
3232 LedCtrl.startupCycle ();
3333
3434 // Attach interrupt callback to detect if SW0 was pressed during sleep
35- pinConfigure (SW0, PIN_DIR_INPUT);
35+ pinConfigure (SW0, PIN_DIR_INPUT | PIN_PULLUP_ON );
3636 attachInterrupt (SW0, button_pressed_callback, FALLING);
3737
3838 // Now we configure the low power module for power down configuration, where
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ void setup() {
3333 LedCtrl.startupCycle ();
3434
3535 // Attach interrupt callback to detect if SW0 was pressed during sleep
36- pinConfigure (SW0, PIN_DIR_INPUT);
36+ pinConfigure (SW0, PIN_DIR_INPUT | PIN_PULLUP_ON );
3737 attachInterrupt (SW0, button_pressed_callback, FALLING);
3838
3939 // Now we configure the power save configuration. Note that this has to be
Original file line number Diff line number Diff line change @@ -284,7 +284,7 @@ void setup() {
284284 LedCtrl.startupCycle ();
285285
286286 // Set PD2 as input (button)
287- pinConfigure (PIN_PD2, PIN_DIR_INPUT);
287+ pinConfigure (PIN_PD2, PIN_DIR_INPUT | PIN_PULLUP_ON );
288288 attachInterrupt (PIN_PD2, sendHeartbeatInterrupt, FALLING);
289289
290290 // Set PF6 as input (reset button)
You can’t perform that action at this time.
0 commit comments