|
ENTS-tock
Environmental NeTworked Sensor firmware on Tock OS
|
#include <Arduino.h>#include <ArduinoLog.h>#include "driver/gpio.h"#include "esp_sleep.h"Go to the source code of this file.
Functions | |
| void | print_wakeup_reason () |
| void | setup () |
| void | loop () |
Variables | |
| RTC_DATA_ATTR int | bootCount = 0 |
| void loop | ( | ) |
Definition at line 101 of file example_deepsleep.cpp.
| void print_wakeup_reason | ( | ) |
Definition at line 25 of file example_deepsleep.cpp.
Referenced by setup().
| void setup | ( | ) |
Definition at line 71 of file example_deepsleep.cpp.
References bootCount, and print_wakeup_reason().
| RTC_DATA_ATTR int bootCount = 0 |
Example code for wakeup from deep sleep.
Load example code on the stm32 that triggers the wakeup pin every 5 seoncds and observe the boot count increasing.
Some of this code is taken from esp32duino eamples. https://docs.espressif.com/projects/arduino-esp32/en/latest/api/deepsleep.html
Definition at line 21 of file example_deepsleep.cpp.
Referenced by setup().