@fdlou147 According to my personal experience, I'd recommend to split up Gateway and Node funktionality and use two seperate mcu's.
Wrt. to the code itself: you only set up a debouncer on one of the pins (finally: Pin 5), as you always redefine the same "flags" over and over again. Perhaps have a look at this imo excellent multi relay/button sketch by korttoma here. This one should be not to hard to adopt to your needs (still, I'd recommend two mcu's).
following this thread loosely.
I have the following sensors and they seem to be accurate to some degree:
http://www.aliexpress.com/item/DFRobot-Capacitive-Analog-Soil-Moisture-Sensor-3-3-5-5V-Corrosion-Resistant-with-Gravity-3-Pin/32574020064.html?spm=2114.01010208.3.2.P99ddH&ws_ab_test=searchweb201556_0,searchweb201602_1_10037_10017_507_10033_10032_10040,searchweb201603_1&btsid=8d3b5e46-a069-441a-a1f7-491ae7e317e1
and they are much easier to work with Arduino compared to Watermark stuff. Anyone agree?
Hi @tbowmo, do you mind to explain a bit about the design? I'm interested with your design.
I will use these steps for removing voltage regulator, http://goo.gl/CsZaNg
So the design will be battery > external step up regulator (http://goo.gl/PFt99R - to stabilize 3.3v) > vcc pin ?
with these then I can use my first post design?
Thanks