A sample application to read a Analog-to-Digital port and display it's value
In order to run this sample you will need a Intel Galileo Gen2 board, a Grove adapter board, and a Grove potentiometer. Both Grove parts are available as part of the Galileo IOT Starter Kit.
The program will read the voltage on ADC port 0 (A0 on the Grove) once a second and print the current value. If the value is 0, the program will exit.
Process started (ID: 0x106c040)
A0 = 1912
A0 = 1912
A0 = 1912
A0 = 1912
A0 = 1912
A0 = 1912
A0 = 1872
A0 = 3268
A0 = 3980
A0 = 4084
A0 = 4092
A0 = 2256
A0 = 1648
A0 = 1648
A0 = 1648
A0 = 1648