Skip to main content

Shims for the rpi_vl53l0x library for the CounterFit virtual IoT device app

Project description

CounterFit Shims - VL53L0X distance sensor


Shims for the Rpi-VL53L0X distance sensor.

See the Rpi-VL53L0X Docs for the API documentation.

Getting started

To use these shims, you will need to install CounterFit and have it running, with the appropriate hardware created.

  • Install this package from pip:

    pip install counterfit-shims-rpi-vl53l0x
  • Import VL53L0X using the counterfit_shims_rpi-vl53l0x package instead of the rpi-vl53l0x package, as well as importing the CounterFitConnection from the counterfit_connection module:

    from counterfit_connection import CounterFitConnection
    from counterfit_shims_rpi_vl53l0x.vl53l0x import VL53L0X
  • Configure the connection to the CounterFit app. Change the hostname and port to where you are running it:

    CounterFitConnection.init('', 5000)
  • Write your VL53L0X code as usual, setting the I2C address to match the one you set in the CounterFit app.

    For example, create a distance sensor on port 0x29:

    distance_sensor = VL53L0X(0x29)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release. See tutorial on generating distribution archives.

Built Distribution

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page