Hi,
The ESP32 is not communicating via UART with the RG15. Maybe someone could spot where this is running off the rails?
Much of my understanding has come from this excellent project: GitHub - sensebox/rg15-arduino-lib: Library for Hydreon RG15 and arduino, made to fix problems with old hydreon lib and original lib. · GitHub.
For this project the RG15 is powered via the ESP32’s VSYS and GND pins.
When the ESP32’s power comes on the RG15 boots a few seconds later with its three LED flashes, indicating it is ready to go.
In the sketch UART2 is connected to the RG15 like this
#define SerialSensor Serial2 // UART = UART2
#define GPIO16 32 /*RX*/
#define GPIO17 34 /*TX*/
// Serial2 Pin Mapping
// • RX (Receive): GPIO 16 (physical 32, white wire, connected to RG15 4 - Serial OUT)
// • TX (Transmit): GPIO 17 (physical 34, green wire, connected to RG15 5 - Serial IN)
// • VSYS (physical 39, red wire supplies line voltage (5v) from USB or PoE connection)
// • GND (physical 38, black)
void setup() {
Serial.begin(9600);
while (!Serial);
Serial.println(" Serial Setup done...");
SerialSensor.begin(9600, SERIAL_8N1, /*RX*/GPIO16, /*TX*/GPIO17);
while (!SerialSensor);
Serial.println(" SerialSensor Setup done...");
}
SeriaSensor.begin seems to return successfully. Later in the sketch a command is sent to the RG15 like this
SerialSensor.println(data); // Send to sensor This appends CRLF
And then later the sketch looks for a response from the RG15 like this
while (SerialSensor.available()) {
data = SerialSensor.readString();
Serial.print(" recieved: ");
Serial.print(data);
}
But SerialSensor.available() never returns true so the command never made it or it never responds or …
The wiring between the TX and DX connections has been verified several times. Both UART0 and the RG15 are set to 9600 Baud.
Thank you in advance for any thoughts as to where this might be running off the rails!
WoodManEXP (Robert)
Here is a pic of the setup:





