Skip to content
Ken Sharp edited this page Dec 8, 2023 · 1 revision

analogRead()

Reads the value from the specified analog input channel(s).

Syntax

analogRead(unsigned char numChans, unsigned char* channels, unsigned char* values);

numChans
The number of analog channels to read from.

channels
A pointer to the first element in a byte array containing the analog channels to read from.

values
A pointer to the first element in an unsigned byte array that will be populated with the bit packed analog values in ADC ticks. The array must be of size aiResolution*numChans.

Returns

int status.

Related Links

Clone this wiki locally