evive have 10 analog input pins behind Magic Lid. The Atmega controllers used for the evive contains a total of 16 channel analog-to-digital (A/D) converter out of these only 10 analog inputs are available to the user. The converter has 10 bit resolution, returning integers from 0 to 1023. The main function of the analog pins for most Arduino users is to read analog sensors.
analogRead(pin) function reads the value from the specific analog pin. The output is a integer value between 0 and 1023 (Due to a 10 bit analog to digital converter), which is mapped between 0 and 5 volts input voltage. This yields a resolution between readings of: 5 volts / 1024 units or, .0049 volts (4.9 mV) per unit.
evive a has two in-built potentiometers connected to A9 and A10. In this example we will read the analog reading from A9 and display the value on TFT Screen.
In the second example we will convert the analog reading with the voltage value. The voltage and the analog reading conversion relation is given by V = (5*A)/1023.
Given below is the Arduino IDE sketch: