Microcontroller › Arduino › LED on/off › Hi TedYou can read that pin’s
January 26, 2018 at 2:16 pm #14699
According to my knowledge, to genearte a sine wave with both positive and negative halves you will need to have another pin, apart from PWM one, which will help in changing the overall polarity. If it is so in your case, then you can easily check out for this pin's status and do the rest accordingly. This pin would either be in "set" (logic 1) state or "reset" (logic 0) state depending upon the polarity required.