File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,8 @@ class RAKWismeshTagBoard : public mesh::MainBoard {
6262 digitalWrite (LED_PIN, HIGH);
6363 #endif
6464 #ifdef BUTTON_PIN
65- while (digitalRead (BUTTON_PIN));
65+ // wismesh tag uses LOW to indicate button is pressed, wait until it goes HIGH to indicate it was released
66+ while (digitalRead (BUTTON_PIN) == LOW);
6667 #endif
6768 #ifdef LED_GREEN
6869 digitalWrite (LED_GREEN, LOW);
@@ -72,7 +73,8 @@ class RAKWismeshTagBoard : public mesh::MainBoard {
7273 #endif
7374
7475 #ifdef BUTTON_PIN
75- nrf_gpio_cfg_sense_input (digitalPinToInterrupt (BUTTON_PIN), NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_SENSE_HIGH);
76+ // configure button press to wake up when in powered off state
77+ nrf_gpio_cfg_sense_input (digitalPinToInterrupt (BUTTON_PIN), NRF_GPIO_PIN_PULLUP, NRF_GPIO_PIN_SENSE_LOW);
7678 #endif
7779
7880 sd_power_system_off ();
You can’t perform that action at this time.
0 commit comments