sen0575 Tipping Rain Gauge
Hello! I'm working with the rain gauge and an ESP32-Wroom-32. The ESP32 is already part of a device that includes a BME280 temp/pressure/humidity sensor, a TFT ST7735 display with SD data chip, and a DFRobot soil moisture sensor. The existing device works fine- when powered up, it boots and is able to connect to my wifi. (I did have to replace a USB power supply that apparently was getting “weaker” and preventing the device from connecting to wifi.) The program displays on both the TFT display and a webpage, the current temp, high/low, barometric air pressure and humidity, and soil moisture, as well as timestamps from NTP.
Now, I'm trying to connect the tipping rain bucket. The new program compiles and loads, but only runs properly if I hit the RST button after powering up. Several questions:
1) I am only able to connect/work the rain gauge in UART mode. When I attempt I2C, which is how the BME and TFT+SD are connected, nothing works. With the Adafruit BME and TFT/SD libraries, I specify the CLK and SDA pins; with the DFRobot_RainfallSensor library, I only specify &WIRE . I guess one method of setting up I2C conflicts with the other.
2) In my new application, when I attempt to get “the accumulated rainfall within 1 hour of the system” (Sensor.getRainfall(1)), the program hangs, or maybe waits an hour? However, “Get the accumulated rainfall during the sensor working time” (Sensor.getRainfall()) and the “Get the raw data, the number of tipping buckets for rainfall, unit: times” (Sensor.getRawData()) work fine. Is perhaps the use of NTP time interfering with the time function for “accumulated rainfall” functions? I should point out that the demo programs for the rain gauge work fine in both the UART and I2C modes.
3) Is there a way to reset the sensor working time? As I said, turning off/on the power does not properly boot the device, so a remote boot doesn't work.