Closed Shedevri closed 2 years ago
If I understand you correctly you're asking what to do when the LED is turned on when the pin goes low? In that case the functions are just reversed. AKA setLedOff turns into setLedOn and vice versa. You could implement a switch or something along the lines that autoreverse these functions for you to keep readability.
yes, but other functions also change and do not work correctly
What behaviour are you seeing? There should be no reason the other functions shouldn't work. Just inverted in its output.
what to do if led is turned on by ground?