I am using an Arduino in an automation project which will be using a state machine to conduct a one-hour scenario. Currently, the Arduino reads each input pin, runs its state update script, then sets each update pin. 99.99% of the time, each output pin will be set to the same state that it had in the last step. Although it is better (in my opinion) to only set the pin when a setting changes, I was wondering if constantly checking and setting pins would have a big negative impact on the hardware?
Would checking a pin's current state (digitalRead or other method) before setting the pin improve anything?