This repository contains links to various libraries that are used to support functions and features of the EnvidoDIY Mayfly Data Logger board. Please note that these libraries are not maintained in this repository, but rather are independent repositories that are linked as submodules of this repository.
Please let us know if you have any trouble installing the libraries!
The simplest way to use these libraries is to right-click on this carefully crafted -->->link<-<--, select "save link as", and save the file somewhere on your computer. You can also click on "libraries.zip" in the file list above and then click the grey download button on that page to download the zip. In your the Arduino Software (IDE), import that zip file following the instructions for "Manual Installation" from https://www.arduino.cc/en/Guide/Libraries#toc5. You cannot directly import the zip using the Arduino Library Manager because it contains multiple libraries.
To update the libraries, you will need to re-download the zip file and overwrite the folders in your Arduino libraries folder.
Please DO NOT to use the green "Clone or Download" button to try to download a zip file. The zip downloaded that way will only contain empty folders instead of the libraries themselves.
If you prefer, and are familiar with Git, clone this repo into your Arduino\libraries folder. The libraries should then be accessible to the Arduino Software (IDE). Each library can also be downloaded individually by clicking on that library and then downloading a ZIP of only that library.
The library manager in PlatformIO is far superior to anything in the Arduino.cc IDE. I highly recommend using PlatformIO if you intend to do anything beyond very simple programming.
To install the entire collection on PlatformIO enter this command into the terminal:
pio lib -g install https://github.com/EnviroDIY/Libraries.git#platformio
To update all libraries, run the command:
pio lib -g update
These libraries are for basic components built into the EnviroDIYMayfly:
- soligen2010 fork of Adafruit ADS1x15 - Includes the drivers for the auxillary ADC TI's ADS1115 chip which is built into the Mayfly board. (The ADS115 is a 16-bit analog-to-digital converter (ADC) with a programmable gain amplifier (PGA) and digital comparator.) This fork fixes bugs in the Adafruit version and should be used instead of the version direct from Adafruit.
- EnviroDIY DS3231 - A fork of the Sodaq library which controls the DS3231 I2C Real Time Clock (RTC) built into the EnviroDIY Mayfly.
These libraries are likely to be helpful when using the Mayfly as a sleeping logger:
- EnviroDIY Modular Sensors - A class-subclass setup allowing many sensors to be called with the same commands. This library is dependent on many of the other libraries listed here.
- Sodaq RTCTimer - Works with the DS3231 to easily perform scheduled tasks. This library does not handle sleeping and is intended for use with a continously awake logger.
- SdFat - Communicates with the on-board SD card to read and save data on the card. This is a more efficient and more feature rich replacement of the built-in SD library.
- EnableInterrupt - Administrates and handles both "external" and "pin change" interrupts on the Atmel microcontroller built into the Mayfly. This allows to Mayfly to sleep and save battery. This library also works well as a controller for the versions of SoftwareSerial and SDI-12 linked below that have been stripped of interrupt control.
- Sodaq PCInt - Another simpler library that can administrate pin change interrupts.
- EnviroDIY_GPRSbee - Communicates with the Sodaq GPRSBee to send data over cellular network. This library is an older version of the Sodaq library that has been hacked to work with both rev0.4 and rev0.6 of the GPRSbee. Further work is required to make the current Sodaq GPRSbee library work on the EnviroDIY Mayfly.
- Tiny GSM - A smaller GSM communication library that supports, among others, Sodaq's GPRSBee, Digi's LTE and WiFi XBees, and ESP8266 based WiFi-XBee's like Itead's Wee or DFRobot's Wifi Bee. This library is more compact (and possibly easier to use) than the EnviroDIY_GPRSbee and supports many more modules, but does not include direct support for putting the modems to sleep. The "ModemSupport" module of the EnviroDIY Modular Sensors library does adds that.
These libraries are used communicate with sensors and peripherals:
- AltSoftSerial - Improved software emulated serial, using hardware timers for precise signal timing and availability of CPU time for other libraries to respond to interrupts during data transmission and reception.
- EnviroDIY SDI-12 - Implements the SDI-12 communications protocol that is used by a wide variety of environmental sensors.
- SensorModbusMaster - Implements the Modbus RTU communications protocol that is used by a wide variety of industrial sensors.
- Adafruit Sensor - Adafruit unified sensor library/driver used by many of Adafruit's other sensor libraries.
- Adafruit DHT - Controls the low cost AOSong DHT11, DHT21, AM2301, DHT22, or AM2302 temperature & humidity sensors sold by Adafruit and others.
- Adafruit TSL2561 - Controls the Adafruit TSL2561 digital luminosity sensor.
- Adafruit AM2315 - Controls and communicates with an AOSong AM2315 encased I2C temperature and humidity sensor
- Adafruit BME280 Library - Controls and communicates with a Bosch BME280 humidity, barometric pressure and temperature sensor.
- Adafruit MPL115A2 library - Controls and communicates with a Freescale Semiconductor MPL115A2 Miniature I2C Digital Barometer
- OneWire - Lets you access 1-wire devices made by Maxim/Dallas, such as temperature sensors and ibutton secure memory. For temperature sensors, the DallasTemperature library can be used with this library.
- Dallas Temperature - Arduino plug and go library for the Maxim (previously Dallas) DS18B20 (and similar) temperature ICs
- SDL SSD1306 - Controls the SwitchDoc Labs Grove 128x64 OLED.
- RTCZero - This library is NOT compatible with the EnviroDIY Mayfly, but is included for convenience for anyone using a SAMD board. This controls the real time clock and sleep modes for Atmel SAMD21 boards.
- Northern Widget MS5803 Library - Communicates with a Measurement Specialties MS5803 pressure sensor
- EnviroDIY KellerModbus Library - for all Keller modbus pressure and water level sensors.
These libraries are modified versions that are necessary in order to work together:
These modified versions are necessary because each of these libraries will try to simultaneously monitor all pin change interrupt vectors on any Arduino board causing compiler errors. Instead of allowing them to handle interrupts on their own, these have been stripped of interrupt vector control and require and external pin change interrupt to set up their interrupts for them. The modified versions are only necessary to use two or more of these together. Any pin that supports pin change interrupts can be used with these libraries, provided that you use EnableInterrupt or another library to allow them interrupt control. These can also be used with other AVR boards (including the Arduino Uno, Mega, or Leonardo).
Instead of being controlled by an alternate library, these versions have been cropped to only look at only one interrupt vector each. This means they are each only able to operate on the specified pins rather than any pin that supports pin change interrupts. These will only work together with the listed pin numbers on the EnviroDIY Mayfly itself.