Deep sleep (deep_sleep)¶
What it does: Puts the device into deep sleep mode for the specified interval in milliseconds.

Inputs¶
interval: sleep duration in ms.
Output¶
- none (command block).
When to use it¶
- energy saving with battery power.
- Periodic wakeup to measure and send data.
Tips and pitfalls¶
- After waking up, the program usually starts again from the beginning.
- Save important data to file/NVS before sleeping.
Generated Python example¶
import machine
machine.deepsleep(10000)