HC-SR04 not working with ""Pic"" Anymore

For general Flowcode discussion that does not belong in the other sections.
daddytims_tims
Posts: 74
http://meble-kuchenne.info.pl
Joined: Thu Jun 16, 2022 6:16 pm
Has thanked: 118 times
Been thanked: 13 times

Flowcode v10 HC-SR04 not working with ""Pic"" Anymore

Post by daddytims_tims »

Hi
Goodmorning Everyone,

I was doing a project earlier back before the summer starts with the Hc-Sr04. "NOW ITS NOT WORKING"
It's not compiling with Pics anymore.

I did some trouble shooting and found out that something is wrong with the Hc-SR04 Component.

Can you guys Check on it. Please and Thanks again.

regards.
Attachments
SR04_WaterProof.fcfx
(11.28 KiB) Downloaded 306 times

jgu1
Posts: 813
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 696 times
Been thanked: 183 times

Re: HC-SR04 not working with ""Pic"" Anymore

Post by jgu1 »

Neither in Arduino :?

Br Jorgen
Attachments
SR04_WaterProofArduino.fcfx
(11.13 KiB) Downloaded 282 times

medelec35
Matrix Staff
Posts: 2086
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 644 times
Been thanked: 702 times

Re: HC-SR04 not working with ""Pic"" Anymore

Post by medelec35 »

Hi.
Many thanks for the report.
I will be looking into this today
Martin

medelec35
Matrix Staff
Posts: 2086
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 644 times
Been thanked: 702 times

Re: HC-SR04 not working with ""Pic"" Anymore

Post by medelec35 »

Hi.
I have hopefully fixed the HC-SR04, but it won't be pushed on to the update system until next week.
To try the component.
Browse to this location using file explorer , it's hidden by default so just paste the link into your address bar.

Code: Select all

%ProgramData%\MatrixTSL\FlowcodeV10\Components
Place the attached component.
If Flowcode is already open, then you will need to reload your project for the new component to work
If you run any component updates, then the component you added will be overwritten, so it will stop working again (unless the component update has been pushed).
Attachments
HC_SR04_Ultrasonic.fcpx
(4.87 KiB) Downloaded 261 times
Martin

jgu1
Posts: 813
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 696 times
Been thanked: 183 times

Re: HC-SR04 not working with ""Pic"" Anymore

Post by jgu1 »

Hi Martin!

Sorry not working. If I try to open one of my previus project with the UL sensor, it missing on the 2D board and the componentmacro is strange.
If I then add a new macro I get the screen as you see on the picure.

By the way Martin, your earlyer UL component has working perfectly, why does it suddently not working??

I have the proffesional licence?

Br jorgen
Attachments
Skærmbillede 2024-08-22 153309.png
Skærmbillede 2024-08-22 153309.png (24.73 KiB) Viewed 9200 times

medelec35
Matrix Staff
Posts: 2086
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 644 times
Been thanked: 702 times

Re: HC-SR04 not working with ""Pic"" Anymore

Post by medelec35 »

Hi Jorgen.
As all the components for FC10 are free, you should not be seeing that popup.
As a sanity check I have just used a free version of Flowocde v10:
FC10 Free version.png
FC10 Free version.png (86.4 KiB) Viewed 9192 times
The modified component allows to be added OK and is compiling for me.
The only reason for seeing the pop up is when you try and add a component that was created for FC9 or below in to

Code: Select all

%ProgramData%\MatrixTSL\FlowcodeV10\Components
jgu1 wrote:
Thu Aug 22, 2024 2:38 pm
By the way Martin, your earlyer UL component has working perfectly, why does it suddently not working??
The main reason could be a child of the component has changed, casing a knock-on effect.
Can you try readded the attached component to

Code: Select all

%ProgramData%\MatrixTSL\FlowcodeV10\Components
then reload, or close FC10 then reopen
Does anyone else also have the same issue?
Attachments
HC_SR04_Ultrasonic.fcpx
(4.87 KiB) Downloaded 263 times
Martin

jgu1
Posts: 813
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 696 times
Been thanked: 183 times

Re: HC-SR04 not working with ""Pic"" Anymore

Post by jgu1 »

Well ok Martin. Normal I have no problem with opening a FC9 project in FC10. Something newer? ;)

Still no luck with the new component. Now I get a new error.

Br Jorgen
Attachments
SR04_WaterProofArduino.msg.txt
(5.89 KiB) Downloaded 249 times
SR04_WaterProofArduino.fcfx
(11.66 KiB) Downloaded 264 times
Last edited by jgu1 on Thu Aug 22, 2024 4:33 pm, edited 1 time in total.

medelec35
Matrix Staff
Posts: 2086
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 644 times
Been thanked: 702 times

Re: HC-SR04 not working with ""Pic"" Anymore

Post by medelec35 »

The error is cause by the HC-SR04 pins being set to pins that don't exist
You need to change the pins from port A (as that does not exist within Arduino Uno) and select pins within port B, C or D
Martin

daddytims_tims
Posts: 74
Joined: Thu Jun 16, 2022 6:16 pm
Has thanked: 118 times
Been thanked: 13 times

Flowcode v10 Re: HC-SR04 not working with ""Pic"" Anymore

Post by daddytims_tims »

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
Attachments
Screenshot 2024-08-22 103027.png
Screenshot 2024-08-22 103027.png (201.72 KiB) Viewed 9176 times

jgu1
Posts: 813
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 696 times
Been thanked: 183 times

Re: HC-SR04 not working with ""Pic"" Anymore

Post by jgu1 »

I can compile now but the distance show random numbers.
Attachments
SR04_WaterProofArduino.fcfx
(11.66 KiB) Downloaded 253 times

Post Reply