verylittlewire.device.Device.analogRead

Device.analogRead(channel: int) int[source]

Returns the current digitized analog level of the selected ADC channel.

Analog voltage reading from ADC0 resp. ADC_PIN3 isn’t advised (it is a bit noisy) but supported. Use it at your own risk.

Parameters

channel (int) – Mandatory “channel” number that have to read and can only be a well known number of: ADC0 resp. ADC_PIN3, ADC1 resp. ADC_PIN2, or ADC2 resp. ADC_TEMP_SENS

Returns

Digitized analog level on given “channel” and can only be a value between: 0…1024

Return type

int

USB CTR

15