sro4m-2 waterproof ultrasonic sensor
I found this code for the SRF05 and it works for the SRO4M-2 as well.
Good Luck!
const unsigned int TRIG_PIN=13; //RX
const unsigned int ECHO_PIN=12;  TX
const unsigned int BAUD_RATE=9600;

void setup() {
  pinMode(TRIG_PIN, OUTPUT);
  pinMode(ECHO_PIN, INPUT);
  Serial.begin(BAUD_RATE);
}

void loop() {
  digitalWrite(TRIG_PIN, LOW);
  delayMicroseconds(2);
  digitalWrite(TRIG_PIN, HIGH);
  delayMicroseconds(10);
  digitalWrite(TRIG_PIN, LOW);  

  const unsigned long duration= pulseIn(ECHO_PIN, HIGH);
  int distance= duration/29/2;
  if(duration==0){
    Serial.println(&quot;Warning: no pulse from sensor&quot;);
  } else {
    Serial.print(&quot;distance to nearest object:&quot;);
    Serial.println(distance);
    Serial.println(&quot; cm&quot;);
  }
  delay(100);
}