- This topic has 1 reply, 2 voices, and was last updated 8 years 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 › arduino uno
Hi Harsha
There are two ways to achieve what you're looking for; first is by using two PWM pins, one with sine-wave output and another with GND for the first half cycle and for the second half just interchnage these pin's outputs i.e. now second pin outputs sine-wave and first becomes GND.
Second method: Try adding a DPDT relay and make connections like we do it for turning a DC motor in both directions (that cross connection, if you're getting). Now turn on the relay whenever you want to interchange the outputs.
Good luck