Lesson 19 – Arduino C;C++ Analog Read Function

preview_player
Показать описание
In this video I will explain about the analogRead( ) function which reads the value from the specified analog pin present on the particular Arduino board.
The ADC (Analog to Digital Converter) on the Arduino board is a multichannel converter. It maps the input voltage and the operating voltage between the values 0 and 1023. The operating voltage can be 5V or 3.3V.
The values from 0 to 1023 are the integer values. It can also be written as 0 to (2^10) -1. The time duration to read an analog input signal on the boards (UNO, Mega, Mini, and Nano) is about 100 microseconds or 0.0001 seconds. Hence, the maximum reading rate of analog input is about 10000 times per second.
The syntax is: analogRead(pin) where, pin: It includes the name of the particular analog pin to read from. The data type is int.
Let me write some code that reads the voltage from the specified analog pin (AnaPin) and displays it.
Рекомендации по теме
visit shbcf.ru