Avisaro Online Documentation - Wiki
Impressum Kontakt Sitemap

SLEEP

Description

The SLEEP command puts the module asleep for x seconds. In sleep-mode, most components of the MCU are suspended to save power. To force a premature wakeup, one can pull the EINT0 pin low.

Parameters

SLEEP can be called with zero or one argument, that is the time in seconds the module should sleep. After time is up the module awakes and continues to work. If no argument is given, the module does not wake up automatically. In this case, the only way to wake it up is a low pulse on the EINT0 pin.

Return Value

Always ERR_OK (0)

Example

SLEEP 10 

Let the module sleep for ten seconds

Remarks

SLEEP only affects the MCU and its components. To put a WLAN device into sleep mode, please see the WLAN command, here.