Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, a web toolkit designed to help citizens, conservation practitioners, municipal decision-makers, researchers, educators, and students advance knowledge and stewardship of fresh water. New to EnviroDIY?Start here
Has anyone used a Mayfly to do any state logging? As in, using the Mayfly to trigger other sensors, or devices depending on monitored variables?
Or, having a Mayfly at the end of the line of a state-logger and data sent via the MMW route?
The Trigger library is quite generic, as it will send a pulse or change the polarity on a Mayfly pin based on any measured value crossing any threshold. It can thus be used to control an external device, such as a latching switch (which maintains it’s state even when the Mayfly goes into low power sleep). See https://github.com/EnviroDIY/Trigger/tree/master/hardware
To use with the EnviroDIY Modular Sensors library, you must “unpack” the dataLogger.logDataAndPublish(); function in the loop, as is shown at the bottom of the menu_a_la_carte.ino example (which is commented out by default): https://github.com/EnviroDIY/ModularSensors/blob/master/examples/menu_a_la_carte/menu_a_la_carte.ino