Arduino Analog I/O and PWM
What function is used to read analog values from a sensor in Arduino?
What is the range of values returned by analogRead() on Arduino?
Write Arduino code to read a potentiometer on pin A0 and use its value to control the brightness of an LED on pin 9 using PWM:
What is the range of values for analogWrite() (PWM) on Arduino?
The map() function can be used to convert analog sensor values to different ranges for PWM output.