This shows you the differences between two versions of the page.
arduino:analog_io:analogread [2013/02/15 18:10] 127.0.0.1 external edit |
arduino:analog_io:analogread [2024/02/16 01:04] (current) |
||
---|---|---|---|
Line 3: | Line 3: | ||
====Description ==== | ====Description ==== | ||
- | Reads the value from the specified analog pin. The Arduino board contains a 6 channel (8 channels on the Mini and Nano, 16 on the Mega), 10-bit analog to digital converter. This means that it will map input voltages between 0 and 5 volts into integer values between 0 and 1023. This yields a resolution between readings of: 5 volts / 1024 units or, .0049 volts (4.9 mV) per unit. The input range and resolution can be changed using [[arduino:analog io:AnalogReference]](). | + | Reads the value from the specified analog pin. The Arduino board contains a 6 channel (8 channels on the Mini and Nano, 16 on the Mega), 10-bit analog to digital converter. This means that it will map input voltages between 0 and 5 volts into integer values between 0 and 1023. This yields a resolution between readings of: 5 volts / 1024 units or, .0049 volts (4.9 mV) per unit. The input range and resolution can be changed using [[arduino:analog io:AnalogReference]]. |
It takes about 100 microseconds (0.0001 s) to read an analog input, so the maximum reading rate is about 10,000 times a second. | It takes about 100 microseconds (0.0001 s) to read an analog input, so the maximum reading rate is about 10,000 times a second. | ||
Line 39: | Line 39: | ||
====See also ==== | ====See also ==== | ||
- | * [[arduino:analog io:AnalogReference]]() | + | * [[arduino:analog io:AnalogReference]] |
- | * [[Tutorial/AnalogInputPins | Tutorial: Analog Input Pins]] | + | |
Source: arduino.cc | Source: arduino.cc | ||