Hobbyist Toolkit

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 5004 when using the Read VI for ultrasonic sensor on Raspberry Pi

I'm trying to use the Hobbyist toolkit to read distance from an ultrasonic sensor through a Raspberry Pi 3B+ but just get this error 5004

Download All
0 Kudos
Message 1 of 6
(1,630 Views)

HI 

can you help me i have the same error ?

 

0 Kudos
Message 2 of 6
(1,259 Views)

I couldn't get the ultrasonic read VI to work. I ended up writing python code to read from the sensor and then used the system exec VI to call the python code using SSH and pass the values into LabVIEW.

 

You will need to do the Chroot SSH trick for the system exec SSH to work. 

 

The solution on this topic explains the steps you will need to do. https://forums.ni.com/t5/Hobbyist-Toolkit/Run-python-script-in-LabVIEW-LINX/td-p/4174748 

0 Kudos
Message 3 of 6
(1,254 Views)

imran01_0-1683142796228.png

imran01_1-1683142800704.png

the code and error 

 

 

0 Kudos
Message 4 of 6
(1,245 Views)

I'm having the same issue with accessing an ultrasonic sensor with LabVIEW and a Pi, can you provide an image of the VI or the VI you are using to interface with the ultrasonic sensor.

0 Kudos
Message 5 of 6
(602 Views)

I was able to resolve it by building a VI using the Wait Express VI and Flat Sequence Structure. The following is the code developed. Current code just loops but I will be updating to a SubVI that takes five readings and then returns the average. 

UltraSonic on RPi4B.png

 

0 Kudos
Message 6 of 6
(579 Views)