Would it be possible to have extra analog inputs on the Arduino Zero?

I'm working on a project where I need a couple more analog pins. And I know for a fact that the ATSAMD21 IC has plenty of analog inputs that have been used as digital outputs in the Arduino Zero design.

I tried using pinMode(4, INPUT) and performing an analog read on it. But I got very odd results. The ADC reading would increase in value if the voltage decreased, and stuff like that. The ADC probably isn't set up correctly on that pin. But would it be theoretically possible to get more analog inputs within the constraints of the Arduino IDE? Any help would be greatly appreciated!

  • Nick

I tried using pinMode(4, INPUT) and performing an analog read on it.

Setting the direction of the digital nature of a pin has no impact on the analog nature of a pin, if pin 4 is even an analog pin.

The ADC probably isn't set up correctly on that pin.

More likely, it is your wiring, code, assumptions, or interpretation of the results that is faulty.