Coder Social home page Coder Social logo

esp32_vl53l0x's Introduction

Ryotaro Onuki (a.k.a KERI or kerikun11)

I'm an embedded systems engineer in Japan.
I like to make small and smart devices.
As an example, I made IR-Station, which is an IoT infrared remote controller.
As a hobby, I participate in a robot competition called micromouse.

Links: My Web Site, My Portfolio

esp32_vl53l0x's People

Contributors

close2 avatar justinong avatar kerikun11 avatar ztaylor54 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

esp32_vl53l0x's Issues

ESP32s2 with VL53L0X reset issue

Hi there,
I am working on esp32s2 and want to integrate the vl53l0x with esp32s2.
Code is working fine with esp32.
But when I try to implement it on esp32s2 I get following reset issue

E (277) VL53L0X: VL53L0X_ResetDevice API status: -20 : Control Interface Error

E (3289) VL53L0X: VL53L0X_DataInit API status: -20 : Control Interface Error

E (3289) app_main: Failed to initialize VL53L0X :(

I connected the gpio_xshut pin for hardware reset but the issue remained the same...

  VL53L0X(i2c_port_t i2c_port = 0, gpio_num_t gpio_xshut = GPIO_NUM_4,
          gpio_num_t gpio_gpio1 = GPIO_NUM_MAX)
      : i2c_port(i2c_port), gpio_xshut(gpio_xshut), gpio_gpio1(gpio_gpio1) {
    vSemaphoreCreateBinary(xSemaphore);
  }

Any idea regarding the issue? kindly let me know if any other necessary detail is required

esp ide version

hello don't you have an esp ide version, or is there a way to make it starting from your project?

esp-idf v5 compatibility

Hi! I would love to use this component in my project, but I am using the latest version of esp-idf (v5) and I think (not sure) that it is not compatible.
I tried cloning the repository, including it in the EXTRA_COMPONENT_DIRS but when reconfiguring i get the following error

❯ idf.py reconfigure
...
CMake Error at build/_deps/espvl53l0x-src/CMakeLists.txt:19 (register_component):
  Unknown CMake command "register_component".

I did the following to make it work

diff --git a/CMakeLists.txt b/CMakeLists.txt
index efa0817..440e508 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,22 +1,39 @@
-set(COMPONENT_SRCS
-    api/core/src/vl53l0x_api.c
-    api/core/src/vl53l0x_api_calibration.c
-    api/core/src/vl53l0x_api_core.c
-    api/core/src/vl53l0x_api_ranging.c
-    api/core/src/vl53l0x_api_strings.c
-    api/platform/src/vl53l0x_platform.c
-    api/platform/src/vl53l0x_platform_log.c
-)
+cmake_minimum_required(VERSION 3.5)

-set(COMPONENT_ADD_INCLUDEDIRS
-    inc
-    api/core/inc
-    api/platform/inc
-)
+# set(COMPONENT_SRCS
+#     api/core/src/vl53l0x_api.c
+#     api/core/src/vl53l0x_api_calibration.c
+#     api/core/src/vl53l0x_api_core.c
+#     api/core/src/vl53l0x_api_ranging.c
+#     api/core/src/vl53l0x_api_strings.c
+#     api/platform/src/vl53l0x_platform.c
+#     api/platform/src/vl53l0x_platform_log.c
+# )

-set(COMPONENT_REQUIRES driver)
+# set(COMPONENT_ADD_INCLUDEDIRS
+#     inc
+#     api/core/inc
+#     api/platform/inc
+# )

-register_component()
+# set(COMPONENT_REQUIRES driver)
+
+idf_component_register(
+    SRCS
+    "api/core/src/vl53l0x_api.c"
+    "api/core/src/vl53l0x_api_calibration.c"
+    "api/core/src/vl53l0x_api_core.c"
+    "api/core/src/vl53l0x_api_ranging.c"
+    "api/core/src/vl53l0x_api_strings.c"
+    "api/platform/src/vl53l0x_platform.c"
+    "api/platform/src/vl53l0x_platform_log.c"
+    INCLUDE_DIRS
+    "inc"
+    "api/core/inc"
+    "api/platform/inc"
+    REQUIRES
+    "driver"
+)

 target_compile_definitions(${COMPONENT_TARGET}
     PRIVATE USE_I2C_2V8=1

Will making these changes be the only way to make it compatible with my project?

Failed to initialize VL53L0X

Hi there i was testing this code on my esp32 and vl53lox and i am getting the bellow error

E (3350) VL53L0X: VL53L0X_ResetDevice API status: -7 : Time out error

E (3357) VL53L0X: VL53L0X_DataInit API status: -3 : Undefined error

E (3357) app_main: Failed to initialize VL53L0X :(

i have checked the pin configuration its all correct. i am using a ATK-PMW3901 module which has built in vl53lox

how to convert app_main.cpp to main.c

Hi
My previous code that I am using is in C and i m using esp-idf. This example runs fine but when I try to integrate this code with my existing C code I run into some issues. So is there any way that I convert this code into C so that I can intergate it with my code
Thanks

C example

don't you have a c example?
my ide didn't want to accept the class in the header file

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.