Hcsr04 code

hello I am working on a project that I only need to use echo using 3 pin. I only see a value when I close the trig with tape and it is not consistent. Distance is not important to me. could you please offer me a code thanks.

This is not a free code writing service. We gladly will help you get your code to work, but you need to do the work. Post your best effort. Describe what your code actually does and how that differs from what you want it to do.

Read the forum guidelines to see how to properly post code and some advice on how to ask an effective question.

you are right, my mistake is due to the title. sorry. I’m actually using the ready-made newping 3 sensor code. I don’t need trig, I turned off trigs, I am using a separate sender hcsr04. I read some values, but of course it’s not consistent. Is it possible to get any value using only echo? I just knew it was coming from that direction. I would really appreciate if you can help. Thank you very much for your interest.

 #include <NewPing.h>

#define SONAR_NUM 3      // Number of sensors.
#define MAX_DISTANCE 200 // Maximum distance (in cm) to ping.

NewPing sonar[SONAR_NUM] = {   // Sensor object array.
  NewPing(4, 5, MAX_DISTANCE), // Each sensor's trigger pin, echo pin, and max distance to ping. 
  NewPing(6, 7, MAX_DISTANCE), 
  NewPing(8, 9, MAX_DISTANCE)
};

void setup() {
  Serial.begin(115200); // Open serial monitor at 115200 baud to see ping results.
}

void loop() { 
  for (uint8_t i = 0; i < SONAR_NUM; i++) { // Loop through each sensor and display results.
    delay(50); // Wait 50ms between pings (about 20 pings/sec). 29ms should be the shortest delay between pings.
    Serial.print(i);
    Serial.print("=");
    Serial.print(sonar[i].ping_cm());
    Serial.print("cm ");
  }
  Serial.println();
}

İts not possible ?