🔌Analog-to-Digital Converter (ADC)
Also known as ADC, Analog Input, analogRead
A part that reads how strong a signal is. It turns that into a number.
Think of it like
It is like a ruler for power in a wire. It turns how much into a number.
Example
Why it matters
Most of the real world is not just on or off. The ADC lets code read heat, light and sound levels.
Definition
Example code
cpp
int level = analogRead(A0); // 0 to 1023 on an UnoCommon mistake
Key takeaways
- 1Voltage in. A sliding signal from a sensor.
- 2Number out. A whole number code can use.
- 3Bits set steps. 10 bits gives 1,024 steps.