Code Monkey home page Code Monkey logo

vl53l0x-linux's People

Contributors

kevin-pololu avatar mirkix avatar mjbogusz avatar romainreignier avatar shervinemami avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

vl53l0x-linux's Issues

The issue in Single Sensor Reads in line 55 and 56.

The issue in Single Sensor Reads in line 55 and 56.
Error :

Scanning dependencies of target single
[ 8%] Building CXX object examples/CMakeFiles/single.dir/single.cpp.o
/home/debian/VL53L0X_TOF_Module/vl53l0x-linux-master/examples/single.cpp: In function ‘int main()’:
/home/debian/VL53L0X_TOF_Module/vl53l0x-linux-master/examples/single.cpp:63:31: error: ‘VcselPeriodPreRange’ is not a member of ‘VL53L0X’
sensor.setVcselPulsePeriod(VL53L0X::VcselPeriodPreRange, 18);
^~~~~~~
/home/debian/VL53L0X_TOF_Module/vl53l0x-linux-master/examples/single.cpp:64:31: error: ‘VcselPeriodFinalRange’ is not a member of ‘VL53L0X’
sensor.setVcselPulsePeriod(VL53L0X::VcselPeriodFinalRange, 14);
^~~~~~~
examples/CMakeFiles/single.dir/build.make:62: recipe for target 'examples/CMakeFiles/single.dir/single.cpp.o' failed
make[2]: *** [examples/CMakeFiles/single.dir/single.cpp.o] Error 1
CMakeFiles/Makefile2:89: recipe for target 'examples/CMakeFiles/single.dir/all' failed
make[1]: *** [examples/CMakeFiles/single.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

2 sensors

Hi
Thank you so much for sharing this!
I was able to stream one sensor correctly, even without connecting the xshut pin (default addess 0x29)
Now I would like to stream 2 vl53l0x with a raspberry pi 4
I am using pins 17 and 27 (wiPi 0 and 2) for the xshut.
Here is how I modified the continousMultipleSensors.cpp example:

	// Configuration constants
	// Number of sensors. If changed, make sure to adjust pins and addresses accordingly (ie to match size).
	const int SENSOR_COUNT = 2;
	// GPIO pins to use for sensors' XSHUT. As exported by WiringPi.
	const uint8_t pins[SENSOR_COUNT] = { 0, 2 };
	// Sensors' addresses that will be set and used. These have to be unique.
	const uint8_t addresses[SENSOR_COUNT] = {
		VL53L0X_ADDRESS_DEFAULT + 2,
		VL53L0X_ADDRESS_DEFAULT + 6
	};

I also notice that with this code, after calling

sensors[i]->initialize();

if I check $ i2cdetec -y 1 the output is (weird):

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 
10: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 
20: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 
30: 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f 
40: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 
50: 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f 
60: 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 
70: 70 71 72 73 74 75 76 77  

Also if instead I use the single.cpp with 2 sensors and I wave my hand in front of one of them one at a time, I get both measures (not sure in which order..)

What am I doing wrong? Can you help me somehow?
Hope I was clear

Port to WiringX

Port the VL53L0X library to WiringX.

Mostly because it supports RaspberryPi, Odroid and many others in mainline (as opposed to my hacked-together version of WiringPi).
Also it is supported more actively, has (subjectively) better codebase, is licensed under MPL (vs GPL) and so on.

¿max sensors amount?

Hi! Thanks for your great contribution!

I was wondering if your library would work with 96 sensors.

Do you think it would?

And what could be the max reading frequency it could handle?

Or, what do you think would be the limit in amount of sensors and frequency? (if trying to connect the most sensors possible)

Thank you so much for your reply : )

Kiko from Perú

Raspberry Pi 3. Runtime error (multiple sensors)

Board: Raspberry Pi 3B
OS: Raspbian Stretch

Can't run multiple sensors example. I have 3 pcs, so I changed the count of sensors in example. Also added 10K pull-up resistors between 3.3v and XSHUT.

Catch runtime error:
terminate called after throwing an instance of 'std::runtime_error'
what(): Failed opening file: /sys/class/gpio/gpio1/direction
Process finished with exit code 134 (interrupted by signal 6: SIGABRT)

Any ideas?

Works with BeagleBone Blue too

I tested this with one Seeedstudio Grove - Time of Flight Distance Sensor(VL53L0X).
The 'Grove Universal 4 Pin to Beaglebone Blue 4 Pin Female JST/SH Conversion Cable' allows an easy connection.
The Grove - I2C Hub also can be used.

Unfortunately the Grove sensor doesn't provide XSHUT/GPIO. So multi sensor or other features requiring XSHUT probably don't work with the Grove sensor.

Many thanks for the linux port and the nice code!

img_0466

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.