0
0
Arduinoprogramming~10 mins

LowPower library usage in Arduino - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to put the Arduino into sleep mode for 8 seconds using the LowPower library.

Arduino
LowPower.[1]();
Drag options to blanks, or click blank then click option'
ApowerDown
Bidle
Cstandby
Dsleep
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'sleep()' which is not a function in the LowPower library.
Using 'idle()' which is a lighter sleep mode.
Using 'standby()' which is not the deepest sleep mode.
2fill in blank
medium

Complete the code to put the Arduino into power down sleep mode for 4 seconds.

Arduino
LowPower.powerDown([1], ADC_OFF, BOD_OFF);
Drag options to blanks, or click blank then click option'
ASLEEP_4S
BSLEEP_2S
CSLEEP_8S
DSLEEP_FOREVER
Attempts:
3 left
💡 Hint
Common Mistakes
Using SLEEP_2S which sleeps for 2 seconds.
Using SLEEP_8S which sleeps for 8 seconds.
Using SLEEP_FOREVER which sleeps indefinitely.
3fill in blank
hard

Fix the error in the code to correctly disable the ADC before sleeping.

Arduino
LowPower.powerDown(SLEEP_8S, [1], BOD_OFF);
Drag options to blanks, or click blank then click option'
AADC_ON
BADC_DISABLE
CADC_SLEEP
DADC_OFF
Attempts:
3 left
💡 Hint
Common Mistakes
Using ADC_ON which keeps the ADC enabled.
Using ADC_DISABLE which is not a valid constant.
Using ADC_SLEEP which does not exist.
4fill in blank
hard

Fill both blanks to put the Arduino into power down mode for 1 second with ADC and BOD disabled.

Arduino
LowPower.powerDown([1], [2], BOD_OFF);
Drag options to blanks, or click blank then click option'
ASLEEP_1S
BADC_OFF
CADC_ON
DSLEEP_8S
Attempts:
3 left
💡 Hint
Common Mistakes
Using ADC_ON which keeps ADC enabled.
Using wrong sleep duration constants.
5fill in blank
hard

Fill all three blanks to put the Arduino into power down mode for 2 seconds with ADC off and BOD on.

Arduino
LowPower.powerDown([1], [2], [3]);
Drag options to blanks, or click blank then click option'
ASLEEP_4S
BADC_OFF
CBOD_ON
DSLEEP_2S
Attempts:
3 left
💡 Hint
Common Mistakes
Using SLEEP_4S instead of 2 seconds.
Turning BOD off when it should be on.