Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 46

PWM is a form of signal modulation that allows digital output to approximate an analog signal. Use this for questions about using the PWM pins (marked with ~).

4 votes
Accepted

Do I need to use a resistor if I am using a potentiometer to control an LED's brightness?

That value is then fed to a PWM analog output, through the analogWrite() call, that will output a square wave to the LED. … The relative position of the pot will determine the duty cycle of the PWM, i.e., how long the square wave is HIGH or LOW. …
Ricardo's user avatar
  • 3,380
24 votes
Accepted

Why do some pins have a different PWM frequency?

Those aren't the only frequencies available for the PWM signals. However, they are the frequencies as determined by the applied prescaler (which you can readily change as detailed below). … My sources: http://playground.arduino.cc/Code/PwmFrequency http://arduino.cc/en/Tutorial/SecretsOfArduinoPWM http://arduino.cc/en/Tutorial/PWM http://arduino-info.wikispaces.com/Arduino-PWM-Frequency …
Ricardo's user avatar
  • 3,380