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.

evive Analog Pins


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.

Note: If the analog input pin is not connected to anything, the value returned by analogRead() will fluctuate based on a number of factors (e.g. the values of the other analog inputs, how close your hand is to the board, etc.).


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.

evive Poentiometers

A potentiometer is a variable resistor which can be used to create an adjustable voltage divider. Internal to the pot is a single resistor and a wiper, which cuts the resistor in two and moves to adjust the ratio between both halves. Externally there are usually three pins: two pins connect to each end of the resistor, while the third connects to the pot’s wiper.
Given below is the Arduino IDE sketch:

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: