07-25-2014 07:23 PM
Que tal tengo un problema con labview arduino y el sensor ultrasonico HC-SR04 ya tengo el programa en labview pero no se como incluir la libreria en lifa_base para hacerlo funcionar he intentado pero me marca errores por favor agradeceria su ayuda
08-22-2014 01:28 PM
If you have LabVIEW 2011 or later, you should use LINX because it has this sensor integrated.
08-24-2014 10:02 AM
Hi Nathan_B, do you think that is better use LINX that a .vi to get the distance using HC-SR04 sensor? I say that because I have a .vi that controls the trigger and echo pin and all the processing is made in .vi.. thanks for your answer.
08-24-2014 10:06 AM
It's not possible to interface with that sensor directly with LIFA. It requires a special function available on the Arduino but not available in LIFA. That special function is used in LINX to interface with the sensor.
08-24-2014 10:14 AM
thanks for your answer..so I'm wrong, I'm going to change the .vi and use LINX.
09-16-2014 01:11 PM
Hello Nathan.
I have a project on water level measurement using arduino v1.0.5 , LED and ultrasound sensor HCSR-04, I wish coupled with labview 2011.
But it does not work with labview. Please your support for configuration in Labview, I'll leave the code in arduino.. Thanks
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int trigger=8;
int echo=9;
float pulso, cm;
void setup(){
pinMode(7,OUTPUT);//electrovalvula de llenado
pinMode(6,OUTPUT);
Serial.begin(9600);
pinMode(trigger,OUTPUT);
pinMode(echo,INPUT);
lcd.begin(16,2);
//lcd.print("Sistema de medicion de nivel de agua");
}
void loop(){
digitalWrite(7,HIGH);
delayMicroseconds(5);
digitalWrite(6,HIGH);
delayMicroseconds(5);
digitalWrite(trigger,LOW);
delayMicroseconds(5);
digitalWrite(trigger,HIGH);
delayMicroseconds(10);
digitalWrite(trigger,LOW);
pulso= pulseIn(echo, HIGH);
cm = pulso / 29 / 2;
lcd.setCursor(0,0);
lcd.print("dist:");
Serial.println(cm);
lcd.setCursor(5,0);
lcd.print(cm);
delay(1000);
}
09-16-2014 01:35 PM
Well, you can't use your own Arduino code with LIFA/LINX. You have to use the firmware provided by LIFA/LINX.
09-16-2014 02:11 PM
where I can get it? what other steps should I know? You can provide me something about what I want?
Thanks very much
09-16-2014 02:16 PM
To use LIFA, you upload the firmware that comes with LIFA (in the firmware folder). Once you get the firmware uploaded, test out some of the examples to make sure that they work.