From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
I am trying to build a circuit to measure distance using a HC-SR04 ultrasonic sensor and a myDAQ without and Arduino provided by my university. However, we are struggling to set up the DAQ to produce the signal and receive the signal. wondering is you shred some light on this?
Also, when you have LabVIEW installed and NI-DAQmx afterwards, there are lots of examples available: LabVIEW » Help » Find Examples » Browse in Task structure » Hardware Input and Output » DAQmx.
You'll find two links to possible solutions. You have to combine parts of these solutions.
I'm not familiar with the myDAQ device, but it seems that it can measure the pulse width of a digitial signal. That would give you the distance. But it does not seem to be possible to create a pulse train on the second counter of the myDAQ so you have to find another solution there.