Search found 6 matches

by atmoz_
Sat Jan 14, 2023 6:21 am
Forum: General Discussion
Topic: Read ADC in ULP (deep sleep) and read pushbutton
Replies: 4
Views: 4028

Re: Read ADC in ULP (deep sleep) and read pushbutton

Okay, it works now 8-) Maybe someone in the future has the same problem, hereby the code: if (EnableSleep){ digitalWrite(POWER, HIGH); //pcb power digitalWrite(26, HIGH); //tcrt led power gpio_hold_en(GPIO_NUM_13); //pcb power gpio_hold_en(GPIO_NUM_26); //tcrt power gpio_deep_sleep_hold_en(); esp_sl...
by atmoz_
Fri Jan 13, 2023 6:42 am
Forum: General Discussion
Topic: Read ADC in ULP (deep sleep) and read pushbutton
Replies: 4
Views: 4028

Re: Read ADC in ULP (deep sleep) and read pushbutton

if (WakkerMaakReden != ESP_SLEEP_WAKEUP_ULP){ init_ulp_program(); } start_ulp_program(); When woken by the push button, you're reinitialising everything related to the ULP while it is still enabled or even active. In my experience, overwriting its program memory while running can cause the ULP to l...
by atmoz_
Wed May 18, 2022 6:28 am
Forum: General Discussion
Topic: Read ADC in ULP (deep sleep) and read pushbutton
Replies: 4
Views: 4028

Re: Read ADC in ULP (deep sleep) and read pushbutton

No one that can help me with this? :roll:
by atmoz_
Fri May 13, 2022 5:34 am
Forum: General Discussion
Topic: Read ADC in ULP (deep sleep) and read pushbutton
Replies: 4
Views: 4028

Read ADC in ULP (deep sleep) and read pushbutton

Hi guys, For a project, I want to wake the ESP32 from deep-sleep when an analog value reaches a specific threshold on the ADC. I also want to wake the main processor when I push a button. Everything works except for one thing: when I wake the main processor with the pushbutton, then the next "round"...
by atmoz_
Thu May 05, 2022 6:04 am
Forum: General Discussion
Topic: Wake Up - ADC - Hall Sensor
Replies: 7
Views: 12730

Re: Wake Up - ADC - Hall Sensor

Does anyone here on this forum how I should run this code?

The only thing I want is to read ADC in ULP and if a specific value is reached --> wake up the main processor.

Any help is appreciated 8-)


Thanks in advance!

Atmoz
by atmoz_
Tue May 03, 2022 3:04 pm
Forum: General Discussion
Topic: Wake Up - ADC - Hall Sensor
Replies: 7
Views: 12730

Re: Wake Up - ADC - Hall Sensor

Hi, maybe it will help, I have written it today (works also in Arduino IDE): #include "esp32/ulp.h" #include "soc/rtc_cntl_reg.h" #include "driver/rtc_io.h" #include "driver/adc.h" void ulp_adc_wake_up(unsigned int low_adc_treshold, unsigned int high_adc_treshold) { adc1_config_channel_atten(ADC1_C...