SHT30 (ADA4099) and Raspberry Pi Not Working

Thanks Jason,

This is very VERY helpful and aimed at my level of programming. Cheers.
I am looking to have a master script that fires off sub-processes and then gets readings from the sub-process to feed back into the master to then use that information as a value to trigger other processes.

If I can run some logic by you …
My thoughts thus far are to have a loop with a timed reboot ( say 0600 ). This is to scavenge memory leaks and reset all sensors to a know state using snap action switchs as a home confirmation indicator.
On reboot all objects go to a know state: close all vents, watering system valves, & get an initial reading from all environmental sensors & log all actions ( got the logging working nicely too )

Then in no specific order:

water normally:
if time > 0859 & < 0930) open the return valve on the 240v pressure pump to mix the water reservoir for 30 minutes
then close the return solenoid (valve)
if ( ( time > 0930 & < 0940 ) & ( daylight > 800 lumins) & ( temp > 20 degrees ) fire off the timed watering system on 7 zones sequentially for 5 minutes each ( got this bit working nicely ).
monitor humidity and if < 51% fire run only the top zones of the watering system in sequence
if humidity > 79% stop all the top zones of the watering system
in the main script have a high temperature fail safe that augments the normal watering:
if internal temp > 38 degrees fire off the top watering system
& open top vents fully.
if ( lumens < 400 ) close all vents in sequence to fully closed ( using snap action switch in each of 3 or 4 positions. This can be replaced by a step motor & 1 snap switch (home) when I learn to use each individually before using both in tandem )
if ( lumens > 400 & < 599 ) close all vents in sequence to 1/3
if ( lumens > 600 & < 749 ) close all vents in sequence to 2/3
if ( lumens < 750 ) open all vents in sequence to full open
if external wind speed > 8 then close all vents
if external rain bucket > 4 then close all vents
log external temperature & humidity at 2 degree increments
log all internal values against a time value

The hope is to set this up to keep tropical orchids at an optimum environment, with add-on of weekly adding soluble fertiliser to the water reservoir and then mix that through the 1000 litre IBC (reservoir).
This may allow us to leave the place on holidays when we trust the automated system.

I started this outline in Solenoid Water Valve - Core Electronics Forum (core-electronics.com.au).

1 Like