I have a very simple test sketch in which I\'m trying to set a pin to HIGH and then read its state with digitalRead. Here is my sketch.
HIGH
digitalRead
<
ALways keep in mind. If you are trying to Configure anything ,Just keep it in setup file. Since setup file get executed once , If you are setting In loop . it execute continuous.and try to keep it remain it start state.That is active low state