pololu / vl53l0x-arduino

Pololu Arduino library for VL53L0X time-of-flight distance sensor
https://www.pololu.com/product/2490
Other
345 stars 163 forks source link

Updated to make WIre port selectable in setup #12

Closed mjs513 closed 7 years ago

mjs513 commented 7 years ago

I modified the library to make the Wire port selectable in the setup. Basically, you need to add one line in the examples (which I did):

sensor.begin(); - to use Wire as the default sensor.begin(&Wire1); - to use Wire1 as the default.

I tested this on a Teensy 3.5 so you might want to test on a couple of other boards?

Mike

ryantm commented 7 years ago

@mjs513 thanks for the PR. We are generally interested in this feature being in the library, and at first glance, there are some issues with your pull request:

  1. You've modified files unintentionally (for example, .travis.yml, LICENSE.txt, README.txt) I'd recommend starting from the latest master branch and making your changes on top of that.
  2. Your additions to the .h file are at an inconsistent indentation.
  3. The "_serial" variable prefixes the name with an underscore, which is not the convention of this library. Also, a better name might be "wire".

Ryan

mjs513 commented 7 years ago

I am going to close it and start over and make the change to _serial to wire as you suggested.