I have a water flow sensor (installed on my shower in the bathroom) and I can measure the water flow that passed over it. The sensor is connected to the arduino, that calculates and prints the flow, and the xbee pro s2c sends the data to another xbee pro s2c that is connected to my computer, where I can read the water flow.
The system works, but the battery consuption is high. I´ve tried to put the arduino and xbee in sleep mode, (pin sleep mode), but i can´t make it work.
Anyone has ideia of the skecth of arduino?
Because the main ideia is: both arduino and xbee stay sleeping through the day, and when there´s water consuption (the sensor outputs a signal when the water passes) the arduino wakes up and also wakes the xbee up, and they go on working until the water flow goes to zero again. When there´s no consuption (after the bathing or after washing hands per example), both arduino and xbee go to sleep again. I proably need some special library, any ideia?
Thanks for the attention,