0
0
Arduinoprogramming~5 mins

Wake-up from sleep with interrupt in Arduino - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the purpose of using interrupts to wake up an Arduino from sleep mode?
Interrupts allow the Arduino to wake up immediately when a specific event occurs, saving power by sleeping until needed.
Click to reveal answer
beginner
Which Arduino function is used to put the microcontroller into sleep mode?
The sleep_mode() function from the avr/sleep.h library is used to put the Arduino into sleep mode.
Click to reveal answer
intermediate
How do you attach an interrupt to a pin to wake the Arduino from sleep?
Use attachInterrupt(digitalPinToInterrupt(pin), ISR, mode) where ISR is the interrupt service routine and mode defines the trigger condition (e.g., RISING).
Click to reveal answer
intermediate
What must you do inside the Interrupt Service Routine (ISR) to wake the Arduino from sleep?
The ISR should be short and can set a flag or simply return; the interrupt itself wakes the Arduino from sleep automatically.
Click to reveal answer
advanced
Why is it important to disable ADC and other peripherals before sleeping?
Disabling ADC and unused peripherals reduces power consumption, making sleep mode more effective.
Click to reveal answer
Which library is commonly used to control sleep modes on Arduino?
AWire.h
Bavr/sleep.h
CSPI.h
DEEPROM.h
What does attachInterrupt(digitalPinToInterrupt(pin), ISR, RISING) do?
ASets an interrupt on the pin triggered when the signal rises
BPuts the Arduino to sleep
CDisables the interrupt on the pin
DReads the digital value of the pin
What happens when an interrupt occurs while Arduino is sleeping?
AArduino shuts down
BArduino stays asleep
CArduino resets
DArduino wakes up and runs the ISR
Which of these is NOT a valid interrupt trigger mode?
ASTABLE
BFALLING
CRISING
DCHANGE
Why should the ISR be kept short when waking from sleep?
ATo disable interrupts
BTo use more memory
CTo quickly return control and avoid delays
DTo put Arduino back to sleep
Explain how to set up an Arduino to wake up from sleep using an external interrupt.
Think about the steps from preparing sleep to waking up with a button press.
You got /5 concepts.
    Describe why using interrupts to wake from sleep is better for power saving than polling.
    Compare continuous checking vs waiting quietly.
    You got /4 concepts.