Raspberry Pi Pico & VL53L0X for MicroPython

  Рет қаралды 7,841

Kevin McAleer

Kevin McAleer

Күн бұрын

Пікірлер: 44
@arihirschman6884
@arihirschman6884 2 жыл бұрын
Thank you. Very informative and clear. Thank you for the code. I hope to use this to help my challenged dog use his dog door (He refuses to go through the plastic flaps, so I will open them for him). With two of these cheap sensors on each side I should be able to tell humans vs. dog apart and not open the door every time a human goes near. Again, many thanks.
@stevenhillman6376
@stevenhillman6376 Жыл бұрын
Superb. You got me out of a spot with this.👍
@Orionrobots
@Orionrobots 3 жыл бұрын
Thank you - this is exactly the information I've been looking for. You have a subscriber! The Raspberry Pi Pico is an awesome device for making robots. I've been getting various sensors and devices working with it, only just scratching the surface. PIO is amazing.
@kevinmcaleer28
@kevinmcaleer28 3 жыл бұрын
Awesome! I'm very interested in what you're creating - have you joined my small robots group on Facebook?
@Orionrobots
@Orionrobots 3 жыл бұрын
@@kevinmcaleer28 Now that could be interesting. Are you part of the Piwars community? Lots of small robot builders (it's nothing like Robot Wars - more autonomous, less fighty). One thing worth noting- if your board breaks out the xshut pin, ensure it is pulled up - otherwise the system will timeout when calibrating.
@kevinmcaleer28
@kevinmcaleer28 3 жыл бұрын
@@Orionrobots I’ll have a look into that! Thanks for the pin tip as well
@frankvanderborg
@frankvanderborg Жыл бұрын
Great work, thank you very much. I have got the library and the code (with some small microPython adaptations) running on an ESP32 PICO Kit. This must have been quite a challenge looking at the complexity of the sensor and the size of the libarary. But it works very fast and without misreadings, like the UltraSonic sensors often do.
@zyghom
@zyghom 3 жыл бұрын
I just built the automatic LED on/off on my stairs - super nice and accurate - perfect for such application - PIR is too wide, and ultrasonic is too big ;-)
@kevinmcaleer28
@kevinmcaleer28 3 жыл бұрын
Have you been trying to get the VL53L0X range finder working with the Raspberry Pi Pico and MicroPython? Then this is the video for you!
@kevinmcaleer28
@kevinmcaleer28 3 жыл бұрын
@@jyvben1520 I’ll fix the typo, but leave the other up too
@tinussonnekus3344
@tinussonnekus3344 2 жыл бұрын
Thank you! Very helpful.
@rahulm4182
@rahulm4182 6 ай бұрын
Thanks bro. Very helpful video 👍
@thiennguyenduc8500
@thiennguyenduc8500 3 жыл бұрын
i did , thanks so much
@ubuntuub8340
@ubuntuub8340 2 жыл бұрын
Nice but if one beginner like me then he should have microscope to see the connection of the sensor.
@kevinmcaleer28
@kevinmcaleer28 2 жыл бұрын
Yes - those solder pads are pretty small, however you can use something like the Pimoroni VL53L1X breakout board combined with a breakout garden hat to make this much easier - shop.pimoroni.com/products/vl53l1x-breakout?variant=12628497236051
@JCVENDING
@JCVENDING 2 жыл бұрын
Hi there. Thanks for making this video, it was very educational, despite my very, very basic English. I have downloaded and used your library but found that it cannot measure beyond 50 cm (500 mm). Could you tell me what modifications to make to the library to reach 2 meters? or at least 1 meter which is what I need to use. Thank you.
@sdelquin
@sdelquin 2 жыл бұрын
Thanks for the video. Really interesting! Do you think it will work with a LCD1602 display? Do you anticipate any problem?
@kevinmcaleer28
@kevinmcaleer28 2 жыл бұрын
Should be fine
@sdelquin
@sdelquin 2 жыл бұрын
@@kevinmcaleer28 I worry about refresh rate...
@dougblanding8791
@dougblanding8791 Жыл бұрын
Thank you Kevin for preparing this tutorial. I have gotten it all working exactly as you have described. However, I do have a further question related to the maximum distance (range) the sensor is able to measure. The datasheet says the sensor has a default range up to 1.2 meters but using your code, I am only able to measure below 0.5 meters. (Looking closely at your video, I see your values also confirm this in your setup.) Can you suggest how we can get the sensor to measure values beyond 499 mm?
@kevinmcaleer28
@kevinmcaleer28 Жыл бұрын
If I remember there is a value you can change to make it work at a longer distance but with less accuracy
@eyadalkhalifa1911
@eyadalkhalifa1911 2 жыл бұрын
I'm trying to write a c code for adafruit vl6180 with Pi Pico, but I am getting nowhere. Would you help me please? thanks
@mihneaseuleanu9251
@mihneaseuleanu9251 3 жыл бұрын
Hi, this is a great video. I am using Thonny IDE and RPI Pico, but I don't know exactly how to make the code work. Could you tell me, what exactly to do after downloading the github archive? Thanks!
@kevinmcaleer28
@kevinmcaleer28 3 жыл бұрын
I've updated the README.md for this project to make it more obvious as to how to use the files - have a look and let me know how you get on github.com/kevinmcaleer/vl53l0x
@quentindemory
@quentindemory 3 жыл бұрын
Hi, I have been trying the code, it has worked well sometimes but others, I just get this: setting up i2c [41] Traceback (most recent call last): File "", line 17, in File "vl53l0x.py", line 117, in __init__ File "vl53l0x.py", line 200, in init File "vl53l0x.py", line 356, in _spad_info TimeoutError: Any ideas as to what I could do to get it working everytime?
@kevinmcaleer28
@kevinmcaleer28 3 жыл бұрын
It might need a slight delay in the init function or possibly the reset function, a couple of hundred milliseconds should do it
@Orionrobots
@Orionrobots 3 жыл бұрын
Depending on the vlx board you have, you might need to pull up the XSHUT pin. It will behave badly if that pin is floating.
@danholsapple7327
@danholsapple7327 2 жыл бұрын
Kevin- I recently discovered the joy of Micro controllers and how to connect different sensors. I am new to programming and have basic knowledge of electronics. I have a question about the VL53L0X and the MicroPython code to run it on the PICO. Seems that a distance past its intended use starts to give random numbers. How could you filter this out if you were going to use the sensor to start and stop motors in small robot car? The setup I have used starts and stops the car at random times. Love your channel by the way. Seems great for advanced users and Noobs like myself. Dan
@kevinmcaleer28
@kevinmcaleer28 2 жыл бұрын
Hey Dan - are the random numbers generally above a certain threshold? You could also take say 10 readings add them together then divide by 10 to get an average, this is a quick and dirty filter algorithm
@danholsapple7327
@danholsapple7327 2 жыл бұрын
@@kevinmcaleer28 Seems like anything over 8140mm causes some strange readings. So from the top of my work desk to ceiling was just enough. When pointing across the room the numbers become small or negative. I tried to average in my code but it just averages small or negative numbers. This causes the motors to stop and do strange things to find a wall or object closer. Again Im so new and only using bits that I have found on line or easy code I can understand to write myself. Thanks for the quick reply.
@danholsapple7327
@danholsapple7327 2 жыл бұрын
Sorry Kevin- after further testing it seems to act strange after about 450mm. I tried on two VLs and got same results. If i back off past this number it causes trouble and then goes to 8140mm until I step away to read the wall. This is where it really goes crazy.
@kevinmcaleer28
@kevinmcaleer28 2 жыл бұрын
@@danholsapple7327 I had a look on Google and there are quite a few things that it could be forum.arduino.cc/t/vl53l0x-gives-wrong-reading-when-no-object-in-range/582075/9 how long are the wires you are using - are they soldered or breadboarded, and can you post a photo of the build and the code
@danholsapple7327
@danholsapple7327 2 жыл бұрын
@@kevinmcaleer28 One is on breadboard and one is on a test vehicle that I have cobbled together to test out new things I have learned over the last month. The wires on the bread board at 12cm. I would post a few pictures but not sure how on here.
@0ox3r0xo0
@0ox3r0xo0 3 жыл бұрын
24:00 , lines 24,32,35, values 40000,12,8. what exactly this numbers does?, if 40000 is lower will get faster readings?.
@kevinmcaleer28
@kevinmcaleer28 3 жыл бұрын
This is to do with how long the burst of light is, and how long it takes to read it back in. By adjusting the setting you can read longer distances, but at less accuracy - this enables you to optimise for the distances you intend to use it for.
@theinthanaung22
@theinthanaung22 2 жыл бұрын
I still have memory allocation error while importing library with esp 8266.
@kevinmcaleer28
@kevinmcaleer28 2 жыл бұрын
I've not tested this code on the ESP8266 - it is quite an old chip so might not have as much ram as the Pico
@brianmoore5454
@brianmoore5454 3 жыл бұрын
Are you still working on the SMARS Mini??
@kevinmcaleer28
@kevinmcaleer28 3 жыл бұрын
Yes indeed!
@So-Now
@So-Now Жыл бұрын
uF = Micro Farads, uS = Micro Seconds, uM = Erm........
Using the Raspberry Pi Pico, PCA9685 and MicroPython for Robotics
1:10:35
Raspberry Pi Pico & SSD1306 Display with MicroPython
1:00:51
Kevin McAleer
Рет қаралды 10 М.
🍉😋 #shorts
00:24
Денис Кукояка
Рет қаралды 2 МЛН
Как подписать? 😂 #shorts
00:10
Денис Кукояка
Рет қаралды 6 МЛН
Секрет фокусника! #shorts
00:15
Роман Magic
Рет қаралды 119 МЛН
E011 VL53L0X TOF Sensor for Collision Avoidance System in the Zoomie?
23:30
Making Stuff with Chris DeHut
Рет қаралды 665
Two-way Bluetooth with Raspberry Pi Pico W and MicroPython (Re-upload)
42:36
TinyGo and Raspberry Pi Pico: GPIO and Interrupts
15:16
Pragmatik Tech
Рет қаралды 1,8 М.
Pi Pico W with the Arduino IDE | Using WiFi
49:26
DroneBot Workshop
Рет қаралды 153 М.
Raspberry Pi Pico W: WiFi  Controlled Robot
17:56
ExplainingComputers
Рет қаралды 90 М.
Control ANY COMPUTER with these Pi KVMs!
17:46
Jeff Geerling
Рет қаралды 827 М.
Raspberry Pi Pico - Control the (I/O) World
1:03:16
DroneBot Workshop
Рет қаралды 609 М.
Raspberry Pi Pico LCD Projects
17:25
ExplainingComputers
Рет қаралды 112 М.
Laser vs Ultrasonic - TOF10120 vs. HC-SR04
31:09
DroneBot Workshop
Рет қаралды 184 М.