Skip to content

Instantly share code, notes, and snippets.

@vishnumaiea
Last active February 4, 2019 12:44
Show Gist options
  • Save vishnumaiea/dbc244788c5a10e29e867998db1ad62d to your computer and use it in GitHub Desktop.
Save vishnumaiea/dbc244788c5a10e29e867998db1ad62d to your computer and use it in GitHub Desktop.
This exports Gist code to plan HTML
noInterrupts (); //temporarily disable interrupts
set_sleep_mode(SLEEP_MODE_PWR_DOWN); // Choose our preferred sleep mode:
sleep_enable(); // Set sleep enable (SE) bit:
ADCSRA = 0; //disable ADC
power_all_disable(); //disables all modules
digitalWrite(LED_PIN, LOW); //turn LED off to indicate sleep
interrupts(); //re-enable interrupts
sleep_mode(); //goes to sleep
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment