Q10

Week 10 Quiz

Arduino Analog I/O and PWM

Student Information

Question 1: Multiple Choice (2 points)

What function is used to read analog values from a sensor in Arduino?

Question 2: Multiple Choice (2 points)

What is the range of values returned by analogRead() on Arduino?

Question 3: Short Answer (3 points)

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:

Question 4: Multiple Choice (2 points)

What is the range of values for analogWrite() (PWM) on Arduino?

Question 5: True/False (1 point)

The map() function can be used to convert analog sensor values to different ranges for PWM output.

← Back to Lesson Semester Overview Next Lesson →