UIFlow and unit grove ultrasonic distance sensor
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 ?
ajb2k3 last edited by
@serge normally the TOF sensor fills the void.
How does the US sensor output a signal?
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.
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.
@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.
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?
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.