2. 获取esp32被唤醒的原因 esp_deep_sleep_get_wakeup_cause();
这是一个ESP-IDF的原生方法, 如果我们想用, 需要引入头文件
3. 设置具体的唤醒源请看下面的相关章节
#include <Arduino.h> #include <esp_sleep.h> RTC_DATA_ATTR int bootCount = 0; void setup() { Serial.begin(115200); Serial.printf("ESP32 is restart now! It's the %d time\r\n", ++bootCount); delay(5000); esp_sleep_enable_timer_wakeup(20000000); Serial.println(esp_sleep_get_wakeup_cause()); } void loop() { Serial.println("ESP32 will sleep now!"); delay(100); esp_deep_sleep_start(); }
#include <Arduino.h> #include <esp_sleep.h> RTC_DATA_ATTR int bootCount = 0; void setup() { Serial.begin(115200); Serial.printf("ESP32 is restart now! It's the %d time\r\n", ++bootCount); esp_sleep_enable_ext0_wakeup(GPIO_NUM_35, 0); Serial.printf("the wakeup reason is :%d\r\n", esp_sleep_get_wakeup_cause()); } void loop() { delay(3000); Serial.println("ESP32 will sleep now!"); delay(100); esp_deep_sleep_start(); }
#include <Arduino.h> #include <esp_sleep.h> RTC_DATA_ATTR int bootCount = 0; RTC_DATA_ATTR int BTN_Pin_BITMASK = 0; void callbackPin2() { Serial.println("T2 weak ESP32 up"); } void setup() { Serial.begin(115200); Serial.printf("ESP32 is restart now! It's the %d time\r\n", ++bootCount); esp_sleep_enable_touchpad_wakeup(); Serial.printf("the wakeup reason is :%d\r\n", esp_sleep_get_wakeup_cause()); touchAttachInterrupt(2,callbackPin2,40); } void loop() { delay(3000); Serial.println("ESP32 will sleep now!"); delay(100); esp_deep_sleep_start(); }
ESP-Hosted 解决方案提供了将 ESP 板用作 Wi-Fi 和 Bluetooth/BLE 连接的通信处理器的方法。
ESP-Hosted 提供了一种将ESP芯片和模组用作通信协处理器的解决方案,该解决方案为主机微处理器或微控制器提供无线连接,使主机能够与其他设备通信。简单来说为网卡方案。
Arduino+ESP32上使用TFT_eSPI库快速点亮这个屏幕,驱动芯片ST7789
本文给出了一个ESP32与SPI 接口TFT显示屏接线的详细说明,供大家参考。
本文讲解如何在Micropython环境下使用ESP32的ESPNow功能进行数据传输。
ESP-Dongle 是一款基于 ESP32-S3 芯片开发的多功能 USB Device 解决方案。它不仅外形小巧,功能齐全,更集成了无线 U 盘、SD 卡读取以及 USB 无线网卡等多项功能。
ESP32 系列芯片可以利用 CSI 数据实现动作检测和存在检测。无论是自动调节灯光、风扇,还是节能控制,CSI 技术为智能家居带来了新的可能性。随着 CSI 技术的发展,未来的智能家居将能够更精确地感知和响应我们的行为,实现更高效、更人性化的控制。
ESP32-FreeRTOS项目提供了丰富的示例,帮助开发者快速掌握ESP32的硬件功能和FreeRTOS实时操作系统。
本节我们在迭代二的基础上使用四位数码管和OLED显示屏显示相关交互信息。
本节我们在迭代一的基础上增加采集土壤湿度数据,并根据湿度数据来决定是否自动进行浇水动作。