LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

My rio and distance sensor

Hello,

 

I want to connect the hc sr04 (google for more info) distance sensor with my Rio board.

I don't know how to make the connections in order to measure the distance. The sensor has VCC and GND pin and other two: Echo and Trigger. In what pin and slot (A,B,C) from my Rio i need to connect these two pins ? Any suggestions for Labview code ?

 

Thank you.

 

0 Kudos
Message 1 of 2
(3,174 Views)

Dear rhei,

 

I found the following which may help you get things set up:

 

LabVIEW & DAQ: Ultrasonic Distance Measurement with HC-SR04 4 Terminal Sensor

 

myRIO HC-SR04 Ultrasound Module

 

Also, you should take a look at the user manual for your myRIO for a pinout diagram. (I have included links below for both the myRIO-1900 and the myRIO-1950).

 

USER GUIDE AND SPECIFICATIONS NI myRIO-1900

 

USER GUIDE AND SPECIFICATIONS NI myRIO-1950

 

Based on the above examples, and on the pinouts for the myRIO, depending on how you want to code it, you should look into using either the digital lines for your Trigger and Echo, or the PWM (Pulse Width Modulation - pulse train) lines.

 

Regards,

Alyssa H.

National Instruments

Message 2 of 2
(3,121 Views)