summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Baumann <derflob@derflob.de>2020-05-08 16:40:44 +0200
committerFlorian Baumann <derflob@derflob.de>2020-06-09 11:14:20 +0200
commit502d5c4d528aa4425b51b77f6040de34bb8a8e37 (patch)
treef4fc64e8a4e5a06406091fbce73e20e0cc11650d
parent1aa402595f2561f1a6c6edf6148adea5e9e572ea (diff)
downloadULPSoilMonitor-502d5c4d528aa4425b51b77f6040de34bb8a8e37.tar.gz
ULPSoilMonitor-502d5c4d528aa4425b51b77f6040de34bb8a8e37.tar.bz2
set ULP wake up period to 30s
-rw-r--r--ULPSoilMonitor.ino6
1 files changed, 4 insertions, 2 deletions
diff --git a/ULPSoilMonitor.ino b/ULPSoilMonitor.ino
index 5337a78..499660f 100644
--- a/ULPSoilMonitor.ino
+++ b/ULPSoilMonitor.ino
@@ -9,6 +9,8 @@
#define ADC_FACTOR (3.5f)
#define ADC_VCC_PIN (ADC2_CHANNEL_9)
+#define ULP_PERIOD_MS (30000)
+
extern const uint8_t ulp_main_bin_start[] asm("_binary_ulp_main_bin_start");
extern const uint8_t ulp_main_bin_end[] asm("_binary_ulp_main_bin_end");
@@ -106,8 +108,8 @@ static void init_ulp_program()
rtc_gpio_set_level(GPIO_NUM_25, 1);
rtc_gpio_hold_en(GPIO_NUM_25);
- /* Set ULP wake up period to 1000ms */
- ulp_set_wakeup_period(0, 1000 * 1000);
+ /* Set ULP wake up period */
+ ulp_set_wakeup_period(0, ULP_PERIOD_MS * 1000);
/* Disable pullup on GPIO15, in case it is connected to ground to suppress
boot messages.