Page 1 of 2

Esp 32 using HC-SR04 PROBLEM

Posted: Mon Jun 24, 2024 7:34 pm
by daddytims_tims
Hi All

I am currently working on SR04 project that requires an esp32.
It works with the Pic18f1320 and Pic16F648A.

However, I am not getting any readings, when using the esp32 with the Sr04. it ONLY return 9999.
How can this be resolved?

I need some assistance as it regards to this project.

I attached an example file below

Re: Esp 32 using HC-SR04 PROBLEM

Posted: Tue Jun 25, 2024 11:35 am
by medelec35
Hello.
The properties Use Timer Interrupt, have you tried selecting No instead of yes?

The timer for ESP32 will be investigated.
Thank you for letting us know.

Re: Esp 32 using HC-SR04 PROBLEM

Posted: Tue Jun 25, 2024 4:04 pm
by daddytims_tims
Goodmorning All

Hi martin
No, I didn't select "No", but I just did, another test with 'NO' and the result were 1 then it jumps back to 9999

regards
ryan

Re: Esp 32 using HC-SR04 PROBLEM

Posted: Fri Jun 28, 2024 4:03 pm
by daddytims_tims
Goodmorning Team


Any updates on the TIMER FOR THE ESP32?

I haven't got back any Response as yet.

Re: Esp 32 using HC-SR04 PROBLEM

Posted: Tue Jul 02, 2024 1:18 pm
by medelec35
Hello.
Sorry for the delay.
It is on my Todo list, and it will be investigated soon.

Re: Esp 32 using HC-SR04

Posted: Tue Feb 11, 2025 4:20 pm
by daddytims_tims
Hi
Goodmorning.

Any update on this topic?

Am still interested in using the esp32 with the hc sr04

Regards

Re: Esp 32 using HC-SR04 PROBLEM

Posted: Wed Feb 19, 2025 12:53 pm
by medelec35
Hello.
Sorry for the delay.
I'm currently looking into this now.

Re: Esp 32 using HC-SR04 PROBLEM

Posted: Wed Feb 19, 2025 1:19 pm
by medelec35
It's working for me on ESP32 with Use Timer = Yes.
HC SR06 Test1.png
HC SR06 Test1.png (43.39 KiB) Viewed 1775 times
AS the distance measured is 5.5cm, I would expect the result to be between 5 & 6

Re: Esp 32 using HC-SR04 Working

Posted: Wed Feb 19, 2025 11:45 pm
by daddytims_tims
Hi Medelec35

Thanks a lot, my Hc-SR04 is now working with the esp32
:D :D
I can now finish up my Project.

Regards

Re: Esp 32 using HC-SR04 PROBLEM

Posted: Thu Feb 20, 2025 1:14 pm
by medelec35
That's great to hear.
Thank you for the update.