Giter Club home page Giter Club logo

Comments (11)

cparata avatar cparata commented on July 17, 2024 1

Ok thanks. My concern was about some spurious signals on the interrupt pin that could influence the behavior of the sensor, but your tests show that is not true. So, we keep the fix as it is because we have seen that works for all platforms. Thanks again for your contribution!

from vl53l1.

cparata avatar cparata commented on July 17, 2024

Hi @dhebbeker ,
thanks a lot for your findings. The issue on ESP8266 with the original code is systematic? I mean, does it happen at any boot of the board? Is it always present also if you try to power off and then power on the board?
Best Regards,
Carlo

from vl53l1.

dhebbeker avatar dhebbeker commented on July 17, 2024

Hello @cparata, yes the error appears every time. I also re-did the wiring and it did not change.
Is there is any data which may help to find the error? I can run further tests.

from vl53l1.

cparata avatar cparata commented on July 17, 2024

Hi David,
Unfortunately, I do not have a NodeMCU to make some tests on my side. I will try to ask a feedback to ST experts of VL53L1 component. I let you know. Thanks again for your availability.
Carlo

from vl53l1.

cparata avatar cparata commented on July 17, 2024

@dhebbeker , I forgot to ask you if you have the same issue also with the VL53L1_Sat_HelloWorld_Interrupt sketch. Could you confirm it?

from vl53l1.

dhebbeker avatar dhebbeker commented on July 17, 2024

Hello @cparata,

in order to test it with the VL53L1_Sat_HelloWorld_Interrupt.ino example sketch I had to make little adjustments in order to adjust pins, ISR definition and attaching of the ISR (see this comparison). These were necessary because of specifics of the NodeMCU board / ESP8266 MCU. I addition to that I had to do the same modification as to the non-interrupt example above:

-   sensor_vl53l1_sat.VL53L1_StartMeasurement();
+   sensor_vl53l1_sat.VL53L1_ClearInterruptAndStartMeasurement();

Without that last modification, not interrupt is triggered. In case I trigger the ISR manually (by pulling the pin low), this is the same as above:

status is always 0 and !NewDataReady == true

Only with that change the ISR it triggered and data is received.

I hope these insights can help you or your colleagues to find the issue.

Best regards
David

from vl53l1.

cparata avatar cparata commented on July 17, 2024

Hi @dhebbeker ,
thanks for this last test. Discussing with ST VL53L1 experts, it should be safer to call the "VL53L1_ClearInterruptAndStartMeasurement" instead of "VL53L1_StartMeasurement". So, I'm going to modify the sketches with this call and this way we can close this issue and the pending PR.
Best Regards,
Carlo

from vl53l1.

cparata avatar cparata commented on July 17, 2024

Integrated in the master repo. Thanks @dhebbeker !

from vl53l1.

dhebbeker avatar dhebbeker commented on July 17, 2024

I am glad this issue could be resolved. 🎉 Also is appears to have helped for the VL53L3CX library as well.

For the record, the changes were made in c87ec97 and a23f200.

Do you have any insights, why this modification was necessary? It deviates from the user manual UM2133 rev 6 after all.

Thank you for your help @cparata! 👍

from vl53l1.

cparata avatar cparata commented on July 17, 2024

Hi David,
the strange thing is that the issue seems present only with ESP boards because with Nucleo board the issue is not present and the software works as expected in the User Manual. I suppose that, when you tested the Polling Mode, you did not connect the interrupt pin of VL53L1, right?
Best Regards,
Carlo

from vl53l1.

dhebbeker avatar dhebbeker commented on July 17, 2024

Hello Carlo,

in contrary, I am quite sure, that I did connect the interrupt pin. But that pin is not configured by the software. Btw: The directions in the comment say to do so.

I expected that the polling example (VL53L1_Sat_HelloWorld.ino) does not care about that pin, as it is not configured in software.

Just to make sure, I tested VL53L1_Sat_HelloWorld.ino again:

Test # based on GPIO1 / INT result
1 bdd6387 (no fix) directly connected to not configured pin
2 c87ec97 (your fix) directly connected to not configured pin ✔️
3 bdd6387 (no fix) not connected
4 bdd6387 (no fix) connected via 10k to VDD
5 c87ec97 (your fix) connected via 10k to VDD ✔️
6 c87ec97 (your fix) not connected ✔️
7 c87ec97 (your fix) directly connected to not configured pin ✔️

VDD is connected to 3.3V. SCL and SDA to the respective I2C pins. XSHUT is connected to the pin passed to the constructor sensor_vl53l1_sat. GND and GND2 to GND. All tests are using a NodeMCU (ESP-12E) and a VL53L1-SATEL board. At the not configured pin I measure 0V.

I would conclude, that it does not make a difference for VL53L1_Sat_HelloWorld.ino if GPIO1 / INT is connected.

Best regards
David

from vl53l1.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.