djsfantasi
- Joined Apr 11, 2010
- 9,237
You CAN use pin 3, but it has another commonly used assignment. Unless you’re absolutely confident in what you’re doing, it’s best to avoid pin 3.Why with the exception of pin 3? While I can't recall using pin 3 for PWM why can't it be used? I'm curious on that note.
Ron
Let’s say you’re debugging a sketch. Most Arduino models don’t have built-in debugging. So you add debug code to serial print intermediate values and statito the IDE console. You’ve created a difficult to find coding error. Because the IDE console is written to using pin 3. Or if your sketch uses the USB interface, you’ve crashed your sketch. Because the Arduino uses pin 3 for USB communication.
Hence, I routinely recommend that unless absolutely necessary and you know what you’re doing, that you avoid using pin 3 for PWM.
Update: fixed typos.
