Interface Grove Ultrasonic Sensor without shield
niranjanravilevelup opened this issue · comments
Hi,
I am working on interfacing grove ultra sonic sensor v2.0 with my Jetson NX board. I dont have a base hat/shielf/I2C adapter. I want to interface the sensor directly with Jetson board.
I started with looking into : https://wiki.seeedstudio.com/Grove-Ultrasonic_Ranger/ where they have mentioned "If we don't have Grove Base Shield, We also can directly connect Grove_Ultrasonic_Ranger to Seeeduino as below." But this example C library will not work since it uses arduino library.h.
Then I started to work with code in this git: https://github.com/Seeed-Studio/grove.py/blob/master/grove/grove_ultrasonic_ranger.py
Like I mentioned I dont have base shield so I replaced (pin number) with my GPIO pin and got the below error.
Check whether I2C enabled and Grove Base Hat RPi or Grove Base Hat RPi Zero inserted
So i had to remove the lines 98 to 100 and directly configure my pin number and try. It is just printing "Detecting distance.." and nothing else.
It would be really helpful to get some inputs on this.
Regards
Niranjan