readVoltage
Read voltage from analog input pin
Add-On Required: This feature requires the MATLAB Support Package for BeagleBone Black Hardware add-on.
Description
measures
the voltage applied to an analog input pin relative to the ADC ground
pin (voltage
= readVoltage(bbb
, pin_name
)GND_ADC
).
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 range from 0
V (GND_ADC
) to
1.8
V (VDD_ADC
).
Caution
Never connect a voltage greater than
1.8 V
across the ADC pins. Voltages greater than1.8 V
can damage the board.Always connect the negative (ground) side of a voltage source to
GND_ADC
. The ADC measures positive voltages only. A reversed connection can damage the board.
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2015a