Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, an initiative of Stroud Water Research Center designed to help people advance knowledge and stewardship of fresh water.
New to EnviroDIY? Start here

Reply To: DFRobot SEN0244 on Grove Analog AUX

Home Forums Mayfly Data Logger DFRobot SEN0244 on Grove Analog AUX Reply To: DFRobot SEN0244 on Grove Analog AUX

Shannon Hicks

    Because the ADS1115 is a separate chip, you don’t have to declare the ADS1115 input pin numbers as A0, A1, etc. You just call them 0, 1, 2, or 3.

    In your code, you can remove line 8 since you’re declaring an INT that you aren’t actually using anywhere. Or you could keep the line and just change ‘A3’ to ‘3’

    Then in line 26, you can either change ‘A3’ to ‘TDSpin’ or simply ‘3’.

    Assigning the pin number to the INT in line 8 is probably the best practice, and then use “TDSpin” everywhere else so that you can quickly change the number in line 8 to accommodate a sensor input on a different pin.

    It’s fine if you have two different sensor inputs on adjacent Analog Aux pins on the Mayfly Grove port. Just make sure that both sensors are also each directly connected to the ground and Vcc pins.