analogRead Returns 0–1023
Turn a voltage into a number you can use.
Turning Voltage into Numbers
Code cannot use raw volts directly. The analogRead function measures a pin and hands you back a plain number you can work with.
The Range Is 0 to 1023
Every analogRead result lands between 0 and 1023. That is exactly 1024 possible steps, from the lowest voltage to the highest.
All lessons in this course
- Digital vs Analog Signals
- analogRead Returns 0–1023
- Read a Potentiometer Knob
- map() Values to a New Range