LED on/off

ted:
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?

val2 = 50 + amp / 10.0 * sin (stp * i + shift * 0.1 * 6.2831 / 360);
[/quote]
What are you talking about?
What is the application?
What model Arduino?
Can you tell us your electronics, programming, Arduino, hardware experience?
Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.
Thanks.. Tom... :slight_smile: