LowPowerLab Forum

Hardware support => Projects => Topic started by: sparky on July 21, 2017, 07:37:59 AM

Title: Sump Pump Alert
Post by: sparky on July 21, 2017, 07:37:59 AM
I plan on making a simple sump pump alert as described here;

https://lowpowerlab.com/2013/04/25/sump-pump-alert-with-moteino-hc-sr04/

I was wondering what's the best sketch to use.  I would like to have OTA programming option as other examples have.  Looking at the more updated sketch used on the SonarMote sketch here;

https://github.com/LowPowerLab/RFM69/blob/master/Examples/SonarMote/SonarMote_DistanceReader/SonarMote_DistanceReader.ino

leaves me a little (a lot) confused. 

I don't see any needed libraries to #include

I also see a lot of missing #define statements for NODEID, GATEWAYID, NETWORKID...etc  Also nothing for OTA.

What am I missing?

Thanks
Title: Re: Sump Pump Alert
Post by: Felix on July 21, 2017, 08:24:56 AM
That's just a simple example to show how to read distance from the sensor, without any radio interaction.
There are other samples in the same repository (https://github.com/LowPowerLab/RFM69/tree/master/Examples/SonarMote) that illustrate various ways and examples if how you might use the SonarMote. For instance I use it without the radio as a parking aid.
Read this page (https://lowpowerlab.com/guide/sonarmote/) as well for other examples.
The sump pump node uses this sketch (https://github.com/LowPowerLab/RFM69/blob/master/Examples/SonarMote/SonarMote_DistanceTracker/SonarMote_DistanceTracker.ino), but there is no OTA for that. I think once you tweak the sketch there is no real need for OTA which is more complex.
I have not changes my sump pump SonarMote sketch for years and it just works without a hitch.
Title: Re: Sump Pump Alert
Post by: sparky on July 21, 2017, 08:51:58 AM
Great, thanks for the help, and links  ;D
Title: Re: Sump Pump Alert
Post by: HeneryH on May 19, 2018, 01:29:39 PM
You can really tell it has been raining a lot here lately

(https://i.imgur.com/4UnGLT4.jpg)
Title: Re: Sump Pump Alert
Post by: Felix on May 20, 2018, 09:32:07 AM
Interesting pattern!

Lots of rain here as well:

(https://i.imgur.com/77BjeiR.png)