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

Activity

  • Gera posted an update 4 years, 11 months ago

    @shicks Hello Mr. Hicks, I hope everything is well on your behalf,
    I wanted to ask you something real quick, what kind of pin number I have to write down in the analogRead() function for the grove sockets to read data coming from there? I would like to know all of them, the 22, 6, AA0, or how I should write it down if it is in a different way. I hope to hear from you soon!

    • It’s Ms. Hicks, actually. But the If you want to read an analog signal using one of the two analog Grove sockets on the Mayfly board, they are actually connected to the auxiliary 16-bit A/D converter, which is an ADS1115 chip. You’ll need to use an ADS1115 library, which has the commands you use for reading an analog voltage with any one of the 4 channels on the ADS1115. This is in addition to the standard lower resolution analog pins that you can read with the Mayfly (A0 through A5), but are only accessible through the 20-pin header on the lower lefthand side of the Mayfly. You can study the Mayfly schematic to see how all of these different features are connected.

      D22 is the enable line for the aux 3.3v regulator which also powers the 5-volt boost regulator. If you’re using any of the Grove ports, you’ll need to activate D22 in order to send power to the Vcc pin of the Grove sockets, and you can choose which voltage (either 3v or 5v) by using the jumper pins next to each Grove socket.