performance power consumption in loop thread
Posted: Wed May 01, 2019 4:10 pm
hi,
when I wait for something in the main loop like:
would it spare a lot of power if I add some delay in the loop like:
or does the compiler or processor automatically detect the situation and throttle down and there is no need for the delay?
when I wait for something in the main loop like:
Code: Select all
void loop() {
if(boolValue){ //boolvalue normall is false
//do something
}
}
Code: Select all
void loop() {
if(boolValue){ //boolvalue normall is false
//do something
}
//added delay
delay(10);
}