This file defines the aio interface for libmraa
#include "mraa.hpp"
int main ()
{
uint16_t adc_value;
if (a0 == NULL) {
}
for(;;) {
fprintf(stdout, "ADC A0 read %X - %d\n", adc_value, adc_value);
}
}
Aio Constructor, takes a pin number which will map directly to the board number
- Parameters
-
pin | channel number to read ADC inputs |
Read a value from the AIO pin. Note this value can never be outside of the bounds of an unsigned short
- Returns
- The current input voltage, normalised to a 16-bit value
The documentation for this class was generated from the following file:
- /var/lib/jenkins/workspace/mraa-doc/api/mraa/aio.hpp