Loading
Loading
IoT Lab content is currently available in Arabic only. We're working on an English version.
عرض بالعربية →How to make your project's battery last months instead of hours.
// أمر السبات لـ ESP32 لمدة 10 ثوانٍ
#define uS_TO_S_FACTOR 1000000
void setup(){
// كود الحساسات والواي فاي هنا
esp_sleep_enable_timer_wakeup(10 * uS_TO_S_FACTOR);
esp_deep_sleep_start();
}
void loop(){}Leaving a high-current sensor (like MQ smoke sensors) connected to permanent VCC. An MQ sensor will drain the battery in a day even if the processor is asleep. You must control the sensor's power via a transistor to wake it only when needed.