Read voltage from analog input pin
The BeagleBone Black board has six analog input pins. Each analog
input pin has a 12-bit ADC that converts the analog input voltage
to a digital voltage reading. The ADC-driver built into the Linux® kernel
returns the voltage measurement converted to a double. The values
0 V (
Never connect a voltage greater than
Vacross the ADC pins. Voltages greater than
V can damage the board.
Always connect the negative (ground) side of a voltage
GND_ADC. The ADC measures positive voltages
only. A reversed connection can damage the board.
Read voltage at pin
bbb = beaglebone(); readVoltage(bbb, 'AIN0')
ans = 1.64
pin_name— Name for analog input
Name character vector.
voltage— Voltage at analog pin, in volts
Voltage at analog GPIO pin, in volts