How to use Ultrasonic Sensors with Pico - C/C++

Поделиться
HTML-код
  • Опубликовано: 4 окт 2024

Комментарии • 15

  • @lucasdrufva9316
    @lucasdrufva9316 3 года назад

    Thanks! your videos on the pico have helped me a lot. Keep up the good work

  • @kleistrobotics
    @kleistrobotics  3 года назад +2

    Feel free to leave any questions in the comments!

  • @samdeur
    @samdeur 2 года назад

    Nice vid thank you for making it . i was looking for more C/C++ content on the pico. i subscribed to your channel look forward seeing your vids.. I have "Visual Studio 2019" & "Visual Studio 2022" & "Visual Studio Code" installed on my win computer. VS 2022 to practice my C# course. And VS 2019 was voor a school project i did also C# .. And VsCode for PlatForm i/o.. i was thinking that was the best way to get C/C++ working on my win10 machine using "Visual Studio Code" with PlatForm i/o.. I watched a couple of instruction vids on getting everything installed.
    But they all differ a bit. So i am going to have to watch them all again and compare / take notes and see if i can make any sense of it all..
    Greetings From The Netherlands.

  • @givisoltani9506
    @givisoltani9506 2 года назад

    Hi, I like to know what changes you would make to your code if you were using a Parallax Ping Ultrasonic sensor. Thanks.

  • @SU-rk9vd
    @SU-rk9vd 8 месяцев назад

    what the get pulse function?

  • @robmorrill3189
    @robmorrill3189 2 года назад

    Neat ideas here. I'm searching for help in combining a distance sensor with two hobby motors so my students can make simple robots. Seems like a natural project, but I haven't found beginner-level resources on this topic for the Pico. Any thoughts? Thanks!

    • @mynameisname6162
      @mynameisname6162 Год назад

      The code is in micropython so it should be easy to use.
      Found some interesting ideas in the video.
      ruclips.net/video/w0E2aDWQj-M/видео.html

  • @Yours_Odu
    @Yours_Odu 2 года назад

    cool man i liked it
    i have this project where i need to connect 3 of them then log there data into a csv file so that i can display it in a web app
    can you help me out

  • @glenncarver9049
    @glenncarver9049 11 месяцев назад

    What's the max distance of those? isnt' this how rangefinders on guns work?

    • @kleistrobotics
      @kleistrobotics  10 месяцев назад

      The specific sensor I used in the video has a range of about 4 meters. Rangefinders use laser distance sensors. The idea behind the operation is exactly the same, but instead of measure it takes for a sound wave to be reflected back, it measures the amount of time for the laser to be reflected back.

  • @Dimi2509
    @Dimi2509 2 года назад

    What if I need to get distance from 3 ultrasonic sensors? How would I approach to this case?

    • @mynameisname6162
      @mynameisname6162 Год назад

      Enter different gpio pins for the function getInch.
      Example Code:
      //Gpio pins for first sensor
      const unsigned int trigger_1 = 0;
      const unsigned int echo_1 = 1;
      //Gpio pins for second sensor
      const unsigned int trigger_2 = 2;
      const unsigned int echo_2 = 3;
      //Gpio pins for second sensor
      const unsigned int trigger_3 = 4;
      const unsigned int echo_3 = 5;
      printf("
      %d Ultrasonic sensor 1", getInch(trigger_1, echo_1));
      printf("
      %d Ultrasonic sensor 2", getInch(trigger_2, echo_2));
      printf("
      %d Ultrasonic sensor 3", getInch(trigger_3, echo_3));

    • @kleistrobotics
      @kleistrobotics  Год назад

      Looks right to me

  • @vladdobritoiu4187
    @vladdobritoiu4187 2 года назад

    This code does not work for me