We are getting closer. I took one of the Bounce2 library examples for a single button and led and used that for one sensor and a relay. That worked fine for the individual sensors.
Next I took jwmelvins code and reduced it down to one top/bottom sensor and one relay. In this configuration with the sensor beams unbroken he relay does not activate like it should. Using a dowel I would trip the bottom sensor then top sensor and then pull out the dowel and the relay would activate. For some reason the sensors need to be cycled before the relay pin will pull low. That is a problem if the system is empty at startup it will never fill.
Using the single top/bottom sensor and relay code I verified each sensor/relay combination worked but only after a full cycle of the sensors.
Next I uploaded the full code and verified that the sensors need to be cycled before they will work properly.
Now I need to understand why the relay isn't activating at startup with the system empty? I tried setting the bool motorOn to true but that did not make a difference. Changing the sensor delay time does not affect that either.
Next I took jwmelvins code and reduced it down to one top/bottom sensor and one relay. In this configuration with the sensor beams unbroken he relay does not activate like it should. Using a dowel I would trip the bottom sensor then top sensor and then pull out the dowel and the relay would activate. For some reason the sensors need to be cycled before the relay pin will pull low. That is a problem if the system is empty at startup it will never fill.
Using the single top/bottom sensor and relay code I verified each sensor/relay combination worked but only after a full cycle of the sensors.
Next I uploaded the full code and verified that the sensors need to be cycled before they will work properly.
Now I need to understand why the relay isn't activating at startup with the system empty? I tried setting the bool motorOn to true but that did not make a difference. Changing the sensor delay time does not affect that either.