Go Down

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


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


The ones with the ~ are PWM pins. You should be able to use them like normal pins.
Arduino Libraries https://github.com/MajicDesigns?tab=Repositories
Parola for Arduino https://github.com/MajicDesigns/Parola
Arduino++ blog https://arduinoplusplus.wordpress.com


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 will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up