ArduinoLibs
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Enumerations | Enumerator | Functions
Power saving utility functions

Enumerations

enum  SleepDuration {
  SLEEP_15_MS, SLEEP_30_MS, SLEEP_60_MS, SLEEP_120_MS,
  SLEEP_250_MS, SLEEP_500_MS, SLEEP_1_SEC, SLEEP_2_SEC,
  SLEEP_4_SEC, SLEEP_8_SEC
}
 Duration to put the CPU to sleep with sleepFor(). More...
 

Functions

void sleepFor (SleepDuration duration, uint8_t mode)
 Puts the CPU to sleep for a specific duration.The analog to digital converter and the brown out detector will be disabled during sleep mode. More...
 
void unusedPin (uint8_t pin)
 Marks an I/O pin as unused.This function sets pin to be an input with pullups enabled, which will reduce power consumption compared to pins that are left floating.
 

Detailed Description

The functions in this module assist with reducing power consumption on Arduino boards by disabling features that are not used or putting the device to sleep when it is inactive.

Enumeration Type Documentation

Duration to put the CPU to sleep with sleepFor().

See Also
sleepFor()
Enumerator
SLEEP_15_MS 

Sleep for 15 milliseconds.

SLEEP_30_MS 

Sleep for 30 milliseconds.

SLEEP_60_MS 

Sleep for 60 milliseconds.

SLEEP_120_MS 

Sleep for 120 milliseconds.

SLEEP_250_MS 

Sleep for 250 milliseconds.

SLEEP_500_MS 

Sleep for 500 milliseconds.

SLEEP_1_SEC 

Sleep for 1 second.

SLEEP_2_SEC 

Sleep for 2 seconds.

SLEEP_4_SEC 

Sleep for 4 seconds.

SLEEP_8_SEC 

Sleep for 8 seconds.

Definition at line 38 of file PowerSave.h.

Function Documentation

void sleepFor ( SleepDuration  duration,
uint8_t  mode 
)

Puts the CPU to sleep for a specific duration.The analog to digital converter and the brown out detector will be disabled during sleep mode.

The mode parameter indicates the mode to use when the device is sleeping. The default is SLEEP_MODE_IDLE.

Definition at line 132 of file PowerSave.cpp.