RangeTOF_VL53L0X1!

Any bugs you encounter with Flowcode should be discussed here.
jgu1
Posts: 615
http://meble-kuchenne.info.pl
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 507 times
Been thanked: 132 times

Flowcode v10 RangeTOF_VL53L0X1!

Post by jgu1 »

Hi!

I need a short distance measuring in a project so first I start a test With the RangeTOF_VL53L0X1.

I am not able to get it work in simulation or if I use an Arduino real world. If I get the examble from Wiki via help, this examble has nothing to do with the VL53L0X1 to do, same in FC9 :roll:
If I do something wrong.I apoligize.

Br Jorgen
Attachments
Fligth.fcfx
(11.65 KiB) Downloaded 63 times

chipfryer27
Valued Contributor
Posts: 1149
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 285 times
Been thanked: 412 times

Re: RangeTOF_VL53L0X1!

Post by chipfryer27 »

Hi Jorgen

You seem to have forgotten to actually read the sensor. If you add the component macro ReadDistance in your loop you should see some results.

I played with these a while back so I'll try and dig out the charts.

Regards

chipfryer27
Valued Contributor
Posts: 1149
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 285 times
Been thanked: 412 times

Re: RangeTOF_VL53L0X1!

Post by chipfryer27 »

Hi

From memory I think there was an issue in that when simulating, although the component showed correct values under the slider, -1 was always returned

Regards

jgu1
Posts: 615
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 507 times
Been thanked: 132 times

Re: RangeTOF_VL53L0X1!

Post by jgu1 »

Hi Chipfryer!

Of course, your rigth, after adding "read the sensor" it work in real world, I was to fast, thank you very much :D

But simulation still not work, I can live with that ;) . And the examble from Wiki is not the correct examble, something switch :lol: .

Have a nice sunday.

Br Jorgen

chipfryer27
Valued Contributor
Posts: 1149
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 285 times
Been thanked: 412 times

Re: RangeTOF_VL53L0X1!

Post by chipfryer27 »

Hi Jorgen

I'd be interested to hear how you get on with them.

I posted my findings about a year or so ago and whilst fine for my application it didn't approach the accuracy claimed. Benj mentioned previously that they were difficult, so maybe further tweaking of settings might improve. I've never really got around to trying though.
Have a nice sunday.
Sunday will be Funday, I hope :) A colleague obtained a 3D-printer around three years or so ago (Ender 5+) and I assembled it maybe two years ago. Other than a power on test it hasn't even seen electricity in that time. Recently I powered it up and got it working which as anyone with any experience of any printer will know can be frustrating at times. Anyway, whilst it works OK, when it is in it's "tent" it can be a bit dark to see clearly. Rather than keep a simple torch nearby (too easy an idea) I thought I'd use up some SMD LEDs I have sitting around. This also involves my first SMD PCB created in KiCAD too (pain to find correct PCC6 package) so today should be interesting

I hope yours will be more relaxing :D

Regards

jgu1
Posts: 615
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 507 times
Been thanked: 132 times

Re: RangeTOF_VL53L0X1!

Post by jgu1 »

Hi Chipfryer!

After you help me I only ad a short while for testing the VL53L0, so far it look good, I will make more test and you will hear ;)

Ok with the 3D - printer, also very interesting and there are many things that have to fit and work together. Let me also hear how you get it on :P

Have a nice Sun/work day and again thank´s for fast reply.

Br Jorgen

medelec35
Matrix Staff
Posts: 1452
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 512 times
Been thanked: 472 times

Flowcode v10 Re: RangeTOF_VL53L0X1!

Post by medelec35 »

Hi Jorgen.
Thank you for the bug report.
I have fixed the simulation side of the RangeTOF_VL53L0X1 component.
It will only show the distance simulation value if the initialise is added.
I did it like that to make it act like it would with embedded.

If you are happy with the fix, the component modification will be pushed onto the update system ASAP.
If would you like to test before then, browse to this location using File Explorer, it's hidden by default so just paste the link into your address bar.

Code: Select all

C:\ProgramData\MatrixTSL\FlowcodeV10\Components
Replace the existing file with the attached file.
If Flowcode is already open, then you will need to reload your project for the new components to work
If you run any component updates, then the components you added will be overwritten.
Can you let me know if the simulation works for you, please?
Attachments
RangeTOF_VL53L0X.fcpx
(10.46 KiB) Downloaded 65 times
Martin

chipfryer27
Valued Contributor
Posts: 1149
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 285 times
Been thanked: 412 times

Re: RangeTOF_VL53L0X1!

Post by chipfryer27 »

Hi

Simulation now works for me on my charts and in the one I downloaded from Jorgen.

Thanks.

Regards

medelec35
Matrix Staff
Posts: 1452
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 512 times
Been thanked: 472 times

Re: RangeTOF_VL53L0X1!

Post by medelec35 »

Thats great!
Thanks Iain. :)
Martin

jgu1
Posts: 615
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 507 times
Been thanked: 132 times

Re: RangeTOF_VL53L0X1!

Post by jgu1 »

Hi both!

Nice to hear from you to Martin, I can confirm it work perfect for me also, thank you. :D

Can I use the new component file in FC9 also?

@Chipfryer, is the 3D printer up running?

Br Jorgen

Post Reply