Hello, I have been trying to get this project going but its giving me a hard time.
I have a hall effect sensor that is connected to GPIO13 of an esp32. I want it to go to deep sleep and then turn back on when the magnet gets close to the sensor. The sensor gives a LOW signal when there is a sensor closeby and HIGH when there is nothing.
I included the library, turned off the pulldown resistor and enabled the pullup resistor.
When I send it to sleep, it turns back on immediately. What am I missing?
This is the code:
And this is the microcontroller:
https://documentation.espressif.com/esp32-wroom-32e_esp32-wroom-32ue_datasheet_en.pdf
I have a hall effect sensor that is connected to GPIO13 of an esp32. I want it to go to deep sleep and then turn back on when the magnet gets close to the sensor. The sensor gives a LOW signal when there is a sensor closeby and HIGH when there is nothing.
I included the library, turned off the pulldown resistor and enabled the pullup resistor.
When I send it to sleep, it turns back on immediately. What am I missing?
This is the code:
Code:
#include "driver/rtc_io.h"
rtc_gpio_pullup_en(GPIO_NUM_13);
rtc_gpio_pulldown_dis(GPIO_NUM_13);
esp_sleep_enable_ext0_wakeup(GPIO_NUM_13, 0);
esp_deep_sleep_start();
https://documentation.espressif.com/esp32-wroom-32e_esp32-wroom-32ue_datasheet_en.pdf