pololu / vl53l0x-arduino

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

Non-blocking read, GPIO0 signalling support, alternative I2C interface #42

Open badVibes-- opened 4 years ago

badVibes-- commented 4 years ago

-Added methods to read the sensor in a non blocking manner. -Fixed interrupt pin settings. -Added option to use GPOI0 for determining when the sensor has new data. -Added option to define an alternative Wire port for communication.

badVibes-- commented 4 years ago

Forgot to remove a print statement:/

KurtE commented 4 years ago

@badVibes (@mjs513) -- I was also in the process of adding similar functionality. Wondering if makes sense to adapt what I was doing to what you did here or maybe migrate back over to the Adafruit_VL53L0X library which is currently a very thin wrapper (only one query exposed so far), but has the whole ST Library underneath.

The functions I added in my WIP branch (https://github.com/KurtE/vl53l0x-arduino/tree/multi_wire_extended) includes methods:

    bool startRange(void);
    bool isRangeComplete(void);
    bool waitRangeComplete(void);
    uint16_t readRangeResult(void);

Right now in process of adding maybe adapt these to Ada... version