🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    UIFlow and unit grove ultrasonic distance sensor

    UIFlow
    3
    7
    12.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      Serge
      last edited by Serge

      It seems there s no aviable unit for that kind of ultrasonic sensor in UIFlow.

      I've spend some times to search for it.

      I found some issues for an arduino library, some others for non-grove SR04 (with 4 pin VCC, GND, trigger and echo) for micropython that works well on M5Stack.etc etc

      But no script or library for grove Unit and UIflows and M5Stack
      Any idea ? Is it possible to add that unit in UIFlow ?

      ajb2k3A 1 Reply Last reply Reply Quote 0
      • ajb2k3A
        ajb2k3 @Serge
        last edited by

        @serge normally the TOF sensor fills the void.
        How does the US sensor output a signal?

        UIFlow, so easy an adult can learn it!
        If I don't know it, be patient!
        I've ether not learned it or am too drunk to remember it!
        Author of the WIP UIFlow Handbook!
        M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

        1 Reply Last reply Reply Quote 0
        • lukasmaximusL
          lukasmaximus
          last edited by

          Seeedstudio has a grove compatible ultrasonic sensor hcsr04, you could use the micropython library you found and then use the execute block in uiflow to import it and call its functions, alternatively you could make some custom blocks with the block maker.

          1 Reply Last reply Reply Quote 0
          • S
            Serge
            last edited by

            Thanks Lukasmaximus, i ve seen before your page with the grove one, but you use arduino library. I ve already seen the libraries from Seeedstudio.
            I tried the one called "grove_ultrasonic_ranger.py" but something called GPIO is missing when i run the example program.

            Shall i install the whole "grove.py" library ? Well i don't know yet how to do that.

            1 Reply Last reply Reply Quote 0
            • lukasmaximusL
              lukasmaximus
              last edited by

              @Serge the library on the seeedstudio website is for use with raspberry pi therefore its pure python not micropython. The module would need to be ported, which for someone with the know how shouldn't be too hard, but thats not me. The GPIO module is raspberry pi specific the esp32 uses the Pin class within machine to control GPIOs.

              1 Reply Last reply Reply Quote 0
              • lukasmaximusL
                lukasmaximus
                last edited by

                I thought I saw in another topic you posted a link to this module https://github.com/rsc1975/micropython-hcsr04 did it not work for you?

                1 Reply Last reply Reply Quote 0
                • S
                  Serge
                  last edited by

                  Thank you.You re right, i send that post after i tried that module. That HCSR-04 module isn't for Grove, it use 4 pins (VCC, ground, trigger pin, echo pin) . It works very well but..
                  This is my project : i have a mini-robot made with arduino (Uno, motor shield, ultrasonic sensor, servo) and i want to make it again in M5Stack and micropython context. So i bought the GOPlus element that provides controls for 4 servos connexions, 2 independant motors, 3 more grove ports.
                  The problem is : when i use at the same time 1 servo and the basic 4 pins Ultrasonic function, the Echo Pin creates an ERROR on the M5Stack .

                  That s why i wanted to try the grove Ultrasonic.
                  But it s using only 1 pin for trigger and echo.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post