Entering a Sleep Mode

To enter sleep, first set the required sleep mode with the set_sleep_mode(<mode>) function and then call sleep_mode(). The microcontroller is now in sleep and will wake up when the correct interrupt is received.