When your program set state on an OUTPUT pin, it can be sometimes useful to know the state of this OUTPUT for some reasons (sending the output state over internet, etc…) So here is the trick to know the output state of a pin: //exemple for the state of the pin 3 Serial.println(bitRead(PORTD,3)); But why? […]