Skip to content
Arduino libraries used with the EnviroDIY Mayfly data logger board
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
Adafruit_ADS1X15 @ 7d67b45
Adafruit_AM2315 @ 3a8491b
Adafruit_BME280 @ d2d5ed8
Adafruit_DHT @ d6488c1
Adafruit_INA219 @ f0cfb49
Adafruit_MPL115A2 @ 981014c
Adafruit_Sensor @ a785072
Adafruit_TSL2561 @ 0558d76
AltSoftSerial @ e21eec8
DallasTemperature @ 0cf91f6
EnableInterrupt @ a33a20c
EnviroDIY_DS3231 @ 4f2ec1f
EnviroDIY_GPRSBee @ d609e06
EnviroDIY_ModularSensors @ 1520047
EnviroDIY_PCInt_PCINT0 @ 2428974
EnviroDIY_SDI12 @ 296508a
EnviroDIY_SDI12_ExtInts @ e818e6b
EnviroDIY_SDI12_PCINT3 @ e3cc15b
EnviroDIY_SoftwareSerial_ExtInts @ 676df82
EnviroDIY_SoftwareSerial_PCINT12 @ 18a1926
KellerModbus @ 4f69a0e
MS5803 @ 21858dd
OneWire @ fd9c0b5
PubSubClient @ 26ce89f
RTCZero @ de4016b
SDL_SSD1306 @ 2eb9eb3
SdFat @ 635d3fd
SensorModbusMaster @ 5c580a0
Sodaq_PcInt @ 5297321
Sodaq_RTCTimer @ 322d63c
TinyGSM @ bdfa2ba
YosemitechModbus @ a52ba11


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!

Installing Libraries in the IDE:

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 "" 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 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.

Installing Libraries in PlatformIO:

The library manager in PlatformIO is far superior to anything in the 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

To update all libraries, run the command:

pio lib -g update

Included Libraries

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:

  • 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

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.

You can’t perform that action at this time.