Forum >Rainfall Library for Gravity: Tipping Bucket Rainfall Sensor - I2C & UART not available
General Gravity

Rainfall Library for Gravity: Tipping Bucket Rainfall Sensor - I2C & UART not available

userHead nlarson 2023-05-26 11:55:19 3931 Views7 Replies

Github says the RainfallSensor library (https://github.com/cdjq/DFRobot_RainfallSensor) page was not found. Linked from this page: https://wiki.dfrobot.com/SKU_SEN0575_Gravity_Rainfall_Sensor

2025-01-10 03:48:22

I'm having a bizarre problem with the rain gauge. Using the sample program (and the UART option), my ESP32WROOM responds with the correct output, except the 

 

Sensor.getRainfall(1)

 

which somehow just stops or hangs the program. When this function is commented out, the sample program runs properly, giving values and incrementing as I tip the bucket.

 

I copied the sample code into a much larger application that has a TFT mini-display with an SD, a BME280, and a moisture sensor. The application also serves up a webpage. I am using SPI for reading/writing to the BME, TFT, and SD, and an analog pin for the moisture sensor. When I run the program, the void setup() works as expected, printing to the serial monitor the rain gauge version, raw count, etc. However, the same function calls return zeroes when part of void loop()

 

What is going on???

userHeadPic John.Zbesko
John.Zbesko wrote:

Further info: I tried to remove parts of my larger application and also tried to add parts to the demo code to see where the problem arises. My programming skills are such that I was unsuccessful. Aarghh!

2025-01-10 11:25:38
John.Zbesko wrote:

SOLVED Figured out what was going wrong. Be careful which GPIO pins the RX and TX leads are connected to. I had connected to GPIO 25 and 26. When I changed to GPIO 17 and 16, which some pinout diagrams label as UART 2 TX and RX, my code worked as expected! Somehow adding WiFi, Asyncserver,, TFT, BME, SD and analog pin interfered with the rain gauge's use of GPIO 25 and 26 as RX and TX.

2025-01-11 08:01:16
2 Replies
2024-02-12 10:50:09

I'm having trouble getting this to work with a ESP-wroom-32 computer. I tried both UART and IC2 all I get is the Sensor init err!!! msg. I did get it to work with an Arduino Nano, but I need the network that the ESP32 has. Any hints on how to get it to work?

userHeadPic Peter.Quinn
2024-01-14 04:56:14

I am also getting 0.00 reading.. Any ideas what to do?

userHeadPic Barrod4593
2023-12-19 06:29:00

How does the Rain Sensor behave? I have connected it, can read firmware and uptime of the sensor as the examples provide.

But when i use this method getRainfall() with or without any argument i get 0.00 back from the sensor.

I checked the getRawData() function and this does show the increased counts i made by testing it.

Does it only return a new value after an hour?

 

please reach out if you have a solution.

userHeadPic anonymous
2023-05-26 19:49:27

We have modified the wiki.

pls refer: https://github.com/DFRobot/DFRobot_RainfallSensor

 

userHeadPic jenna