Skip to main content
Question Protected by VE7JRO
Tweeted twitter.com/StackArduino/status/964114838703230976
added 8 characters in body
Source Link
gre_gor
  • 1.7k
  • 4
  • 18
  • 28

I've noticed most example snippets always have a delay in the loop even if it's not needed for proper execution of the program. 

I can only assume this is added because people copy and paste without understanding what's going on but it got me thinking if adding a delay could possible save power too. 

If I have a loop that checks some inputs for changes could it be possible that adding a delay(10)delay(10) saves some cycles and thus power?

I've noticed most example snippets always have a delay in the loop even if it's not needed for proper execution of the program. I can only assume this is added because people copy and paste without understanding what's going on but it got me thinking if adding a delay could possible save power too. If I have a loop that checks some inputs for changes could it be possible that adding a delay(10) saves some cycles and thus power?

I've noticed most example snippets always have a delay in the loop even if it's not needed for proper execution of the program. 

I can only assume this is added because people copy and paste without understanding what's going on but it got me thinking if adding a delay could possible save power too. 

If I have a loop that checks some inputs for changes could it be possible that adding a delay(10) saves some cycles and thus power?

Source Link
Ryan Detzel
  • 305
  • 5
  • 10

Does a delay in a loop save energy?

I've noticed most example snippets always have a delay in the loop even if it's not needed for proper execution of the program. I can only assume this is added because people copy and paste without understanding what's going on but it got me thinking if adding a delay could possible save power too. If I have a loop that checks some inputs for changes could it be possible that adding a delay(10) saves some cycles and thus power?