Go Down

Topic: what is the ~ pins and what do they do? (Read 414 times) previous topic - next topic

circuitsguy

Hey guys,

     I am totally new and was trying the blink sketch for the first time, and I realized, what is the differencce between the i/o pins with ~ and without ~ ? I can't light an led on the one that has the ~ on it. So I was just wondering. THANKS!  XD

marco_c

The ones with the ~ are PWM pins. You should be able to use them like normal pins.
Arduino Libraries http://arduinocode.codeplex.com
Parola for Arduino http://parola.codeplex.com

MarkT

Not just "should", they definitely are standard digital pins that can also be used with analogWrite() for PWM (pulse width modulation - see google for more details)

For PWM pins the PWM is turned on when calling analogWrite() and turned off again when calling digitalWrite().  The '~' symbol is, I suppose, a crude representation of a square wave.
[ I won't respond to messages, use the forum please ]

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy