Sleep mode
Posted: Sat Aug 29, 2020 10:52 am
I read a sensor every 10 ms by using an interrupt and do other stuff afterward with Arduino. I use the following while loop and fill-up an array while waiting inside the loop and exit the loop as soon as the array gets full.
I would like to keep a Nucleo L476 to do the same task with the minimum consumption power.
This loop takes a few seconds to be terminated. Is the sleep mode efficient in such cases? How to apply that here?
Many thanks for your guidance!
I would like to keep a Nucleo L476 to do the same task with the minimum consumption power.
Code: Select all
do
{
delay(1);
} while (arrayisfull == 0); // Wait loop
Many thanks for your guidance!