Aio Class
This file defines the aio interface for libmraa
Methods
Aio
-
pin
Aio Constructor, takes a pin number which will map directly to the board number
Parameters:
-
pin
Numberchannel number to read ADC inputs
Returns:
read
()
Number
Read a value from the AIO pin. By default mraa will shift the raw value up or down to a 10 bit value.
Returns:
The current input voltage. By default, a 10bit value
readFloat
()
Number
Read a value from the AIO pin and return it as a normalized float.
Returns:
The current input voltage as a normalized float (0.0f-1.0f)
setBit
-
bits
Set the bit value which mraa will shift the raw reading from the ADC to. I.e. 10bits
Parameters:
-
bits
Numberthe bits the return from read should be i.e 10
Returns:
mraa::Result type
getBit
()
Number
Gets the bit value mraa is shifting the analog read to.
Returns:
bit value mraa is set return from the read function