Analog Input pins are used to measure a voltage. Sometimes I see people use Arduino’s pinMode() to configure it as an INPUT. However, this is not necessary, for two reasons.
pinMode() sets up a pin for use as a digital input, not analog input.
When calling analogRead (), it reconfigures the Analog Pin for “input.”
Oh my… I told myself I wouldn’t get into arduino, that would take the diy synth stuff too far. Well. Here we go! Now I need this module… So I better start reading up!
Edit: Editing this post so I won’t spam everything… Uno seems to be working great! I’ll try and troubleshoot the nano next week.
Another subtlety at least on the Nano, Analog inputs A0-A5 can be used as INPUT_PULLUP (for digital inputs), but not A6 and A7. Those ones are just for analog in. Learned that the hard way. The pinmode function has no impact on those two pins.
Yeah, the Arduino folks are perhaps a bit too good at hiding the underlying mechanisms; for Arduino’s with 32-pin 328Ps, A0-A5 share the pins with GPIO port C which gives you the full GPIO machinery, while A6 and A7 go directly to the ADC’s mux.