Open weiwi opened 1 year ago
Hi! I'm sorry for the delay. Do you have the ability to connect an oscilloscope or logic analyzer to the trigger and echo GPIO? This would clarify whether the echo is actually coming.
I recommend trying your code on a simulator, such as the Wokwi Simulator. This approach allows you to eliminate potential wiring and hardware issues by simulating your setup.
Wokwi offers an HC-SR04 ultrasonic sensor simulator which might be relevant for your needs.
Testing your code in a controlled environment like this can help you identify whether the issue is with the code, wiring, or the hardware components themselves.
Hi @UncleRus, I am using ESP32 wrover ie and esp32 ce-3 mini. I have tried to fetch the distance using SR04M-2 but facing errors like.
I tried to debug the program came to know that it is not fetching timer value in "ultrasonic_meaure_raw" function.
Can you help me with it.
@UncleRus
The issue
I am using ESP32S3, and kept getting when trying to get sonar readings. I have tried both SR04 and AJ-SR04M sonar boards and have similar results:
Can anyone shed some light on this?
Thanks
W
Which SDK are you using?
esp-idf
Which version of SDK are you using?
master
Which build target have you used?
Component causing the issue
ultrasonic
Anything in the logs that might be useful for us?
No response
Additional information or context
No response
Confirmation