Arduino - Week 5
Arduino - Week 5
Lecture Layout
Quiz 1 (10%)
Potentiometer
2
QUIZ! – Instructions
Log in to the PC using your account
The middle pin, moves across the resistor, dividing it into two halves.
When the external sides of the potentiometer are connected to voltage and
ground, the middle leg will give the difference in voltage as you turn the knob.
Analog vs digital signals
5V
0V
5V
0V
Analog to digital conversion (ADC)
Arduino has a built in 10-bit analog-to-
digital converter (ADC)
Digital voltages are translated into a number that ranges from 0 – 255.
0 255
Hands-on Project 3: Analog Input (5%)
When it’s connected with 5V across its two outer pins +5V
analogRead
(pin)
Reads the value from the specified analog pin.
Map input voltages between 0-5V into values between 0 and 1023.