Raspberry Pi Pico & VL53L0X for MicroPython

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ต.ค. 2024

ความคิดเห็น • 44

  • @stevenhillman6376
    @stevenhillman6376 ปีที่แล้ว +2

    Superb. You got me out of a spot with this.👍

  • @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.

  • @Orionrobots
    @Orionrobots 3 ปีที่แล้ว +2

    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 ปีที่แล้ว +1

      Awesome! I'm very interested in what you're creating - have you joined my small robots group on Facebook?

    • @Orionrobots
      @Orionrobots 3 ปีที่แล้ว +1

      @@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 ปีที่แล้ว +1

      @@Orionrobots I’ll have a look into that! Thanks for the pin tip as well

  • @tinussonnekus3344
    @tinussonnekus3344 2 ปีที่แล้ว +1

    Thank you! Very helpful.

  • @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.

  • @rahulm4182
    @rahulm4182 6 หลายเดือนก่อน

    Thanks bro. Very helpful video 👍

  • @thiennguyenduc8500
    @thiennguyenduc8500 3 ปีที่แล้ว +1

    i did , thanks so much

  • @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 ปีที่แล้ว +1

    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 ปีที่แล้ว +1

      @@jyvben1520 I’ll fix the typo, but leave the other up too

  • @JCVENDING
    @JCVENDING 3 ปีที่แล้ว +1

    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.

  • @ubuntuub8340
    @ubuntuub8340 2 ปีที่แล้ว +1

    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

  • @dougblanding8791
    @dougblanding8791 ปีที่แล้ว +1

    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

  • @sdelquin
    @sdelquin 2 ปีที่แล้ว +1

    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...

  • @mihneaseuleanu9251
    @mihneaseuleanu9251 3 ปีที่แล้ว +1

    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

  • @danholsapple7327
    @danholsapple7327 2 ปีที่แล้ว +1

    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 ปีที่แล้ว +1

      @@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 ปีที่แล้ว +1

      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 ปีที่แล้ว +1

      @@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 ปีที่แล้ว +1

      @@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.

  • @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

  • @quentindemory
    @quentindemory 3 ปีที่แล้ว +2

    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.

  • @0ox3r0xo0
    @0ox3r0xo0 3 ปีที่แล้ว +1

    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 ปีที่แล้ว +1

      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 ปีที่แล้ว +1

    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 ปีที่แล้ว +1

    Are you still working on the SMARS Mini??

  • @So-Now
    @So-Now ปีที่แล้ว

    uF = Micro Farads, uS = Micro Seconds, uM = Erm........