Specifications
Bit (in
hexadecimal)
Bit Position
Within Display
Bit (in
hexadecimal)
Bit Position
Within Display
0x0100
0x0001
0x0200
0x0002
0x0400
0x0004
0x0800
0x0008
0x1000
0x0010
0x2000
0x0020
0x4000
0x0040
0x8000
(no effect)
0x0080
(no effect)
sleep(mode, ticks) – Go to sleep (enter low-power mode)
This function puts the radio and CPU on the SNAP node into a low-power mode for a specified
number of ticks. This is used to extend battery life.
Parameter mode chooses from the available sleep modes. The number of modes available, and their
characteristics (such as resolution and accuracy), vary from platform to platform. Refer to section 10 at
the end of this document.
A ticks parameter of 0 can be used to sleep until an IO pin interrupt occurs (see script pinWakeup.py),
but SNAPpy is smart enough to know if you have not enabled a wakeup pin, and will ignore a
sleep(mode, 0) if there is no wakeup possible.
Starting with version 2.2, a negative ticks parameter can be used to access alternate sleep timings.
These also vary between platforms, refer to the section for your hardware.
This function does not return a value.
Page 74 of 202 SNAP Reference Manual Document Number 600-0007K