- This topic has 1 reply, 2 voices, and was last updated 5 years, 4 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
|
Microcontroller › Arduino › LED on/off
This line produces PWM sine to PBA 7, how to make it turn on the LED at C13 when the sine is positive and turn it off when the sinus is negative?
Hi Ted
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.