LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I start communication with HC-SR04 ultrasonic sensor with Arduino on LabVIEW

I can´t start communication with my ultrasonic sensor in LabVIEW, I use this page code https://decibel.ni.com/content/thread/12971, but I can´t do it work, I add the ultrasonic.h Library to LIFAbase, but i have the same result, someone knows how use this sensor with arduino UNO??

The error that show me LabVIEW appears in the glasses icon on ultrasonic.vi

I can did it work, the problem was that the sketch in arduino was not the correct, so I download another ultrasonic library for arduino, and upload the program to arduino again, and done!, the sensor works!, you need to be sure that you upload the LIFA base edited for ultrasonic sensor and have the correctly library for arduino.....

Anyway thanks Nathan_B.

0 Kudos
Message 1 of 11
(11,394 Views)

Have you tried the one that I posted here?

0 Kudos
Message 2 of 11
(6,054 Views)

HI
I had the same problem, I had error when I ran the probgram of this page
https://decibel.ni.com/content/thread/12971
I try with this program with out labview, and ran well, but when I use to labview, I had a problem, the progran it´s suposed to ran with out error, but the indicador "distance" doesn´t apear nothing

If I use this labview interface edit http://dl.dropbox.com/u/8067369/LabVIEWInterface.pde
I have some problems like "redefinition  "void setup(){""

What can I do?

0 Kudos
Message 3 of 11
(6,054 Views)

As I said in the other thread, you can't define your variable in the processCommand function.  Put it up with all the othe variable definitions.  Unfortunately, this method requires you to hardcode your inputs for the variable creation.  Also, without the library that you are using we can't fully help you with your issue if you are still unable to figure it out.

If you are getting redefinition errors then you either have the function declared twice or multiple files with the same definition are getting opened simultaneously.

More details will yield better results.  Have you tried to do it like the link that I posted just above?

Message 4 of 11
(6,054 Views)

hey omcl did you can solve the problem??...... prove with this library https://github.com/elrodri/Ultrasonic-HC-SR04

0 Kudos
Message 5 of 11
(6,054 Views)

Hi
I was use this library
http://www.robot-electronics.co.uk/files/arduino_srf04.ino
If I dowload with out labview, work well, but IF I charge with labview doesn´t Have error, but doen´t give me distance
OK LEOVGL93 I try the library that you bring, but I still have the proble, that, Labview doesn´t have error, but don´t show me distance
thankswas try with this  library
https://github.com/elrodri/Ultrasonic-HC-SR04/blob/master/Ultrasonic/Ultrasonic.h

Download All
0 Kudos
Message 6 of 11
(6,054 Views)

He I solve my problemI use the LIFA SRF05 LV9.zip

in this pag

https://decibel.ni.com/content/message/38645#38645#38645
and work perfect

I hope help  with this page

Message 7 of 11
(6,054 Views)

i used your code and it didnt work with me and the errors shows says what in the picture
please help me
iam using ultrasonic HC-SR04

0 Kudos
Message 8 of 11
(5,931 Views)

LIFA is no longer supported and was replaced by LINX a couple years ago.  LINX has native support for the HC-SR04 sensor.

0 Kudos
Message 9 of 11
(5,915 Views)

i used LINX and it didnt work so i searched for another way




 

0 Kudos
Message 10 of 11
(5,902 Views)