ni.com checkout is currently experiencing issues.
Support teams are actively working on the resolution.
ni.com checkout is currently experiencing issues.
Support teams are actively working on the resolution.
10-01-2012 07:05 PM
I need to modify the LIFA_base.ino to make a application, and I need to send from LabView to Arduino new commands with some variables larger than 1 byte, but is impossible because if I cant send data more than 255 (1 byte), for example, I need to send a new command (I know how I can modify the LIFA_base.ino, this is not a problem form me), and the associated data to this command is a 1000 ms delay, but is not possible to send data larger than 255... Any idea please haw can send data larger than 1 byte?.
Thanks,
Jose
10-02-2012 07:17 PM
Sending information that is more than a single byte is actually quite simple. This is actually done in several places in LIFA. For example, see "Analog Read Pin".
04-11-2013 08:37 PM
hello friend you can program the arduino to receive the characters you need, the code is simple you can improve it...
String dato;
int out1 =10;
int out2 =11;
bool flat1 =LOW;
int temp1;
void setup()
{
pinMode (out1,OUTPUT);
pinMode (out2,OUTPUT);
}
void loop()
{
dato="";
if (Serial.available() )
{
dato =readData();
}
delay(3);
if (dato =="c1"){ proceso1(); }
if (dato =="c2"){ proceso2(); }
readAnalog();
}
String readData()
{
String buffer ="";
if (Serial.available() > 0)
{
int h =Serial.available();
for (int i=0;i<h;i++)
{
buffer += (char)Serial.read();
}
}
return (buffer);
}
int proceso1()
{
digitalWrite(out1,HIGH);
delay(10);
digitalWrite(out1,LOW);
}
int proceso2()
{
flat1 = !flat1;
digitalWrite(out2,flat1);
}
int readAnalog()
{
temp1= analogRead(0);
Serial.println(temp1);
delay (10);
}