control demonstrates triggering a digital output based on a tipping bucket level

control.py

control.bucket_empty(inval)

Routine is tied into a measurement that samples a weighing bucket. Once reading exceeds limit, open valve, wait a bit, close the valve

control.trigger_sampler()

Checks last readings of M1 and M2. If readings meet conditions, sampler is triggered via a digital output