why write the script this way? Answered
great class rhank you!
could you please expain why you have written the sketch this way? instead of, for instance something (that to my noob mind seems easier) like:
if(digitalRead(BUTTON_PIN) == LOW)
it seems like the return function makes a loop that only proceeds if the value of "current" changes, if i undertsand correctly. whats the advantage of this?
is this like a state change detection code? thank you