Forum Replies Created
-
AuthorPosts
-
Once you have physically connected your sensor to your Mayfly board, the next step is to download the library to communicate with the it from GitHub. If you are only interested in the SDI-12 library, download it here: https://github.com/EnviroDIY/Arduino-SDI-12/archive/master.zip. If you would like to download a collection of libraries that might be useful in communicating with and logging data from sensors, including the SDI-12 library, download this: https://github.com/EnviroDIY/Libraries/raw/master/libraries.zip.
To install the libraries into the Arduino IDE, follow the instructions for Manual Installation on the Arduino library guide: https://www.arduino.cc/en/guide/libraries. If you are using PlatformIO you can install only the SDI-12 library using the terminal prompt command: platformio lib -g install “Arduino-SDI-12” or the entire collection of libraries using the command: pio lib -g install https://github.com/EnviroDIY/Libraries.git#platformio. For another IDE, follow the installation instructions for that IDE.
If you have not yet downloaded any IDE or program to communicate with your Mayfly, I highly recommend PlatformIO over the IDE created by Arduino.cc
Up to 61 SDI-12 sensors can be connected to the same pin of the Mayfly. It is more stable to use the same pin for all the SDI-12 sensors you wish to connect rather than using different pins for each because this allows you to create only one instance of the SDI-12 object in your code. To connect multiple sensors to that pin, you can use a Grove branch cable (https://www.seeedstudio.com/Grove-Branch-Cable-%285PCs-pack%29-p-847.html) or a Grove hub (https://www.seeedstudio.com/Grove-I2C-Hub-p-851.html).
2017-03-28 at 4:21 PM in reply to: Custom Arduino-based sensor, off-the-shelf SDI-12 datalogger #2122I’d love any feedback you have on the modular sensors library! Feel free to post GitHub issues or post comments in the forums.
The Libraries repository doesn’t actually have anything new on its own, it’s just a bunch of links so anyone can download some of the more helpful libraries all at once. Do let me know if you think there are any crucial libraries that are missing!
The wonderful people at PlatformIO have now added native support for the Mayfly. Run “platformio update” in the PlatformIO terminal and you will then be able to find the Mayfly in the drop downs and call up the Mayfly as “mayfly” just like any other board.
2017-01-23 at 1:24 PM in reply to: Looking for a bare-bones 16 bit 0-5V dc data logger sketch to build off of #1937How are you trying to talk to the analog pins? To get the 16 bit ADD conversion you must use the auxiliary ADD converter/library for the Ti ADS 1115. Here’s a bit of code that may help you along. (Please note that this code is completely the work of Shannon Hicks!)
1234567891011121314#include <Adafruit_ADS1015.h> /* The library for the auxiliary ADD */Adafruit_ADS1115 ads; /* Use this for the 16-bit version */int16_t adc0, adc1; // adc2, adc3; /* Tells which channels are to be read */// Read Channelsadc0 = ads.readADC_SingleEnded(0);adc1 = ads.readADC_SingleEnded(1);// now convert bits into millivoltsfloat lowvoltage = (adc0 * 3.3) / 17585.0;float highvoltage = (adc1 * 3.3) / 17585.0; -
AuthorPosts