SethSenpai / singleLEDLibrary

A non interrupting lighting library for single LED's
12 stars 10 forks source link

reverse polarity ? #9

Closed Shedevri closed 2 years ago

Shedevri commented 2 years ago

what to do if led is turned on by ground?

SethSenpai commented 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.

Shedevri commented 2 years ago

yes, but other functions also change and do not work correctly

SethSenpai commented 2 years ago

What behaviour are you seeing? There should be no reason the other functions shouldn't work. Just inverted in its output.