Page 1 of 1
How to use the gpio example for deep sleep
Posted: Wed May 15, 2019 1:45 pm
by agualuso
Hello everyone, basically im trying to wake up the board using gpio. Right now im using two buttons but if possible the goal is to use one to wake up and put sleep.
This is what i got so far by using the gpio example
Re: How to use the gpio example for deep sleep
Posted: Thu May 16, 2019 2:54 am
by ESP_houwenxiang
Hi,
The first parameter of `esp_sleep_enable_ext1_wakeup` is the rtc_gpio pin mask, not the rtc_gpio number.
```
else if(io_num == GPIO_INPUT_IO_1){
printf("Wake up\n");
gpio_set_level(GPIO_INPUT_IO_1, 0);
esp_sleep_enable_ext1_wakeup(0x1 << GPIO_INPUT_IO_1, 0);
}
````
Re: How to use the gpio example for deep sleep
Posted: Mon Jun 03, 2019 3:19 pm
by agualuso
Thanks for your reply, i fixed it and its working fine