Skip to content

added ability to use multiple VL53L0X on the same I2C bus #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 30, 2020
Merged

added ability to use multiple VL53L0X on the same I2C bus #12

merged 3 commits into from
Jan 30, 2020

Conversation

2bndy5
Copy link
Contributor

@2bndy5 2bndy5 commented Nov 15, 2019

  • added set_address() to the VL53L0X class. This function follows the Arduino library API meaning the new address is internally saved appropriately.
  • included "important" admonished note about managing the "SHDN" pin as that falls outside the scope of the class/library
  • added an example of how to use the new set_address() function in concert with the "SHDN" pin. Also included a link in the API docs to this example. Additionally, I've made the example easily modify-able for applications with more than 2 VL53L0X sensors. Comments also hint at current consumption requirements.

Question

I've hinted at the different labeling on non-Adafruit branded breakout boards ("SHDN" on adafruit breakouts = "XSHUT" on non-Adafruit breakouts). I don't want to overstep, and since the library is maintained by Adafruit, is it ok to mention non-Adafruit branded labeling?

@kattni kattni requested a review from a team January 8, 2020 19:04
Copy link
Contributor

@jepler jepler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This matches what the Arduino code is doing, as far as I can tell. The chance of impact on other users is low, given that this passes lint and introduces a whole new function rather than modifying anything existing. I did not test actual hardware.

@jepler jepler merged commit 2c8895a into adafruit:master Jan 30, 2020
@FoamyGuy
Copy link
Contributor

I've got a few of the VL53L0X sensors on the way. I will test these changes with multiple sensors once they arrive.

@2bndy5
Copy link
Contributor Author

2bndy5 commented Jan 31, 2020

@FoamyGuy Are they Adafruit branded breakouts or generic? I tested this with 2 generic sensors using the new "multiple_sensors" example script that I added, and it worked fine. I do welcome confirmation though :)

@FoamyGuy
Copy link
Contributor

@2bndy5 They are Adafruit breakout boards. I will get this tested over the weekend.

Copy link
Contributor

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kattni @jepler This tested successfully with a Trinket M0 and 2 VL53L0X. I am able to see distance measurements from both sensors. @2bndy5 Thank you for including this and making a PR!

@2bndy5
Copy link
Contributor Author

2bndy5 commented Feb 1, 2020

Yeah!

@kattni
Copy link
Contributor

kattni commented Feb 1, 2020

Excellent! Thank you @2bndy5 and @FoamyGuy!

adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Feb 4, 2020
Updating https://github.com/adafruit/Adafruit_CircuitPython_CircuitPlayground to 4.0.2 from 4.0.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_CircuitPlayground#87 from kattni/readme-update
  > Merge pull request adafruit/Adafruit_CircuitPython_CircuitPlayground#86 from kattni/express-notimplementederror

Updating https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI to 3.1.2 from 3.1.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_ESP32SPI#87 from adafruit/tannewt-patch-1

Updating https://github.com/adafruit/Adafruit_CircuitPython_MPU6050 to 1.0.3 from 1.0.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_MPU6050#4 from FoamyGuy/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display to 3.8.8 from 3.8.7:
  > Merge pull request adafruit/Adafruit_CircuitPython_RGB_Display#69 from adafruit/second-missing-comma
  > Merge pull request adafruit/Adafruit_CircuitPython_RGB_Display#68 from adafruit/missing-comma

Updating https://github.com/adafruit/Adafruit_CircuitPython_TCS34725 to 3.2.5 from 3.2.4:
  > Merge pull request adafruit/Adafruit_CircuitPython_TCS34725#26 from adafruit/dherrada-patch-2

Updating https://github.com/adafruit/Adafruit_CircuitPython_VL53L0X to 3.2.0 from 3.1.7:
  > Merge pull request adafruit/Adafruit_CircuitPython_VL53L0X#14 from jepler/doc-build-fix
  > Merge pull request adafruit/Adafruit_CircuitPython_VL53L0X#12 from 2bndy5/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_TinyLoRa to 2.0.2 from 2.0.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_TinyLoRa#25 from Gustavvr/master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants