Hobbyist Toolkit

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW can't read the HCSR04 Ultrasonic sensor, Why? (LINX)

Solved!
Go to solution

Hi. I'm a basic user of LabVIEW. I program the sensor ultrasonic HC-SR04 in my LabVIEW (2022 Q3) but the reading of the sensor can't view in the LabVIEW. Do you know what the problem?

 

This is my LabVIEW program.

image.png

 

0 Kudos
Message 1 of 3
(1,928 Views)
Solution
Accepted by topic author auliya26

FYI - it is not a 'LabVIEW' issue. All that LabVIEW does is communicate with the firmware running on Arduino over Serial port. It is the duty of the LINX firmware on Arduino to measure using SR04 and return the measurement over Serial port.

 

The LINX libraries for LabVIEW are responsible for encoding and decoding the communication between your LabVIEW application and the the LINX firmware on Arduino.

 

Do you receive any error popup? what exactly do you see when you run the code? have you selected the correct COM port and programmed the Arduino with LINX firmware?

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 3
(1,922 Views)

Thank you for your answer. I have solved the problem. It's due to wrong pins for DO and D1. It's upside down.

0 Kudos
Message 3 of 3
(1,909 Views)