Closed
Description
Trying to read analog inputs A1 and A2 on a Feather M0 always returns the max value of 4095 regardless of the voltage on the pin. For example:
import machine
adc = machine.ADC(machine.Pin("A1"))
adc.read()
Returns 4095 even if you check with a multimeter the voltage going to the pin is below 3.3v.
This seems to happen only for analog inputs A1 and A2. ADC pins A0, A3, A4, A5 work great and return expected values proportional to the voltage on their pins.
Repro steps:
- Flash latest atmel-samd MicroPython firmware on Feather M0 proto board (firmware built with BOARD=feather_m0_bluefruit_le)
- Add potentiometer used as a variable resistor for checking analog inputs (3.3 volts to one end, ground to other end, middle pin/wiper to ADC input A1 or A2). Any variable voltage source could work though, just something to send some voltage to the ADC.
- Try reading the ADC value and fiddling the knob to move between different voltages:
import machine
adc = machine.ADC(machine.Pin("A1"))
adc.read()
- Notice only 4095 is returned (even when connected to ground).
Metadata
Metadata
Assignees
Labels
No labels