Read voltage from analog pin on Arduino hardware
voltage = readVoltage(a,pin)
Create an Arduino object and read voltage from and analog input pin.
a = arduino; readVoltage(a,'A4')
ans = 1.0606
a— Arduino hardware connection
Arduino hardware connection
arduino, specified as an object.
pin— Analog pin number
Analog pin number on the physical hardware, specified as a character vector.
voltage— Voltage read from analog pin
Voltage read from an analog pin on an Arduino hardware specified as a numeric double.