sparkfun / OpenLog_Artemis

The OpenLog Artemis is an open source datalogger the comes preprogrammed to automatically log IMU, GPS, serial data, and various pressure, humidity, and distance sensors. All without writing a single line of code!
https://www.sparkfun.com/products/15846
Other
88 stars 47 forks source link

Feature request: sensor value triggers analog outputs #187

Closed n8maher closed 9 months ago

n8maher commented 9 months ago

How cool would it be to be able to set a sensor value at which the analog output would be triggered? For example, lighting up an LED when a certain weight was reached on a scale, or to control a fan based on a temperature reading.

In the sensor setup, you would need to add a trigger value, and then set whether to trigger when above or below this value. Bonus points would be given if the trigger could be based on the last x readings or if a certain amount of 'hysteresis' would be required in order for the trigger to be canceled.

Cheers, all!

n8maher commented 9 months ago

If this gets traction, the next step in this direction would be for the Openlog Artemis to recognize the Qwiic motor driver, GPIO board, and Quad relay boards to provide even more ability to control things based on sensor values.

PaulZC commented 9 months ago

Hi @n8maher ,

It's a good suggestion... But this needs a ton of work to do it properly. Each sensor could have multiple things which could be triggers. Some would be int, some float. The menus would grow exponentially. And the loop code would need a list of registered / active triggers and would need to check each one in turn...

Like I say, a good suggestion, but just not practicable on OLA.

This could be a good feature for the DataLogger though. The DataLogger firmware is much more flexible and much better structured. Adding trigger values there should be possible. Please consider opening a Feature Request over there. Thanks!

Best wishes, Paul