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-vl530l0x
-
Import VL53L0X using the
counterfit_shims_rpi-vl530l0x
package instead of therpi-vl530l0x
package, as well as importing theCounterFitConnection
from thecounterfit_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('127.0.0.1', 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for counterfit_shims_rpi_vl53l0x-0.1.0.dev2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5bb3fce4599c54cc886938f2c71556a66ebaf17dbabcacd3d6fb14c63463c08 |
|
MD5 | a7770e83a0256a11fcf89732f1ad3675 |
|
BLAKE2b-256 | eb4fba68344216a76d7ddf5dd04f6787afbd574360a54dc6f7a4fc9be891f4c3 |