How to AnalogRead the Analog pins on the Extension Board?

Hi. I’m trying to read the A0,A1,A2,A3,A4 pins on my extension board. I’m not sure how to refer to them in analogRead(n)

What should ‘n’ be?

Thanks!

Hey @noto!

You’ll find the sensor expansion board’s ADC pin values in the analogInputs[n] array, using 0-4 for n. As with all sensor board values, you need to declare this special named array variable with the export keyword in front of it to have its values populated:

export var analogInputs

Check out the docs here:

https://electromage.com/docs/sensor-expansion-board#adcs

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.