Page 2 of 5
Re: HC-SR04 not working with ""Pic"" Anymore
Posted: Thu Aug 22, 2024 4:45 pm
by medelec35
daddytims_tims wrote: ↑Thu Aug 22, 2024 4:34 pm
Hi Martin
I just tried. It still doesn't work. I copy the file to the folder updated it, try compiled but fail.
I restarted the win 11/ project It still fails.
I am using v10
That still looks like the old version and not the latest?
Can you go to Library updates and select Show up-to-date files and what version does it show for HC_SR04_Ultrasonic.fcpx?
Re: HC-SR04 not working with ""Pic"" Anymore
Posted: Thu Aug 22, 2024 4:50 pm
by medelec35
jgu1 wrote: ↑Thu Aug 22, 2024 4:42 pm
I can compile now but the distance show random numbers.
That could be down to the Timer Settings property,
What about starting at say 1:1 for both, then just increase if still not working?
1:1 is not recommended for really fast clock speeds e.g. esp32
Re: HC-SR04 not working with ""Pic"" Anymore
Posted: Thu Aug 22, 2024 4:59 pm
by daddytims_tims

- Updates.png (146.03 KiB) Viewed 5739 times
Re: HC-SR04 not working with ""Pic"" Anymore
Posted: Thu Aug 22, 2024 6:01 pm
by medelec35
Hi.
That tells me I was correct.
When you add the fixed component to
Code: Select all
%ProgramData%\MatrixTSL\FlowcodeV10\Components
What you should see is:

- unoffical updates.png (4.21 KiB) Viewed 5721 times
Since it's not an official library update.
Did you restart Flowcode or reload your project.
Don't click on the Download after adding the unofficial component update.
Re: HC-SR04 not working with ""Pic"" Anymore
Posted: Thu Aug 22, 2024 6:25 pm
by daddytims_tims
Hi
Martin, I had click update during earlier part.
Since your last message, I follow on to that Now I got it to work.
Thanks, Alot
I will update you
Re: HC-SR04 not working with ""Pic"" Anymore
Posted: Thu Aug 22, 2024 8:01 pm
by jgu1
With arduino.
No matter what I do when I use timer interrupt, the value is fluactuating. But if I "disable " timerinterrupt it work fine.
Thank´s Martin glad it working again.
Jorgen
Re: HC-SR04 not working with ""Pic"" Anymore
Posted: Thu Aug 22, 2024 8:33 pm
by medelec35
Hi Jorgen.
I will look in to why its fluctuating with Arduino tomorrow.
Re: HC-SR04 not working with ""Pic"" Anymore
Posted: Thu Aug 22, 2024 8:53 pm
by jgu1
Thank you, very much.

Re: HC-SR04 not working with ""Pic"" Anymore
Posted: Fri Aug 23, 2024 8:51 am
by medelec35
hi Jorgen.
Sorry it's the other way around.
With the Uno can you try with Timer 0 set to:
Prescaler 1:1024
Postscaler 1:16
Re: HC-SR04 not working with ""Pic"" Anymore
Posted: Fri Aug 23, 2024 4:01 pm
by jgu1
Hi again Martin!
Yes, now it is stable, but the distance is max. 92 Cm.
br Jorgen