hi guys, i've been reading a lot of post on how to make it work, but still i cant make a full duplex com betwen the arduino and labview.
since my english is quite poor, i'll talk through images :3
ARDUINO SIDE
void loop(void)
{
if (Serial.available()) {
String serial_input_01 = Serial.readStringUntil(serial_input_separator);
Serial.read();
String serial_input_02 = Serial.readStringUntil(serial_input_separator);
Serial.read();
String serial_input_03 = Serial.readStringUntil(serial_input_separator);
Serial.read();
String serial_input_04 = Serial.readStringUntil(serial_input_terminator);
Serial.read();
int input_01 = serial_input_01.toInt();
int input_02 = serial_input_02.toInt();
int input_03 = serial_input_03.toInt();
int input_04 = serial_input_04.toInt();
switch (input_01) {
case 1:
if (input_02 == 1) {
digitalWrite(7, LOW);
}
if (input_02 == 2){
digitalWrite(7, HIGH);
}
break;}
if i write in the serial monitor from the arduino 01,01 and hit enter digital write(7) turns off, if i write 01,02 turns on, so i guess it works right? if i wirte for instance 02,###,###,### i set the colors of an rgb led.
after the switch case structure:
sensors.requestTemperatures();
Serial.print("A");
Serial.println(sensors.getTempCByIndex(0));
int potValue = map(analogRead(potPin), 0, 1023, 0, 100);
Serial.print("B");
Serial.println(potValue, DEC);
delay(250);
} // end loop
as you can see arduino send every loop the values of the bs18d20 and the pot
A##.##
B###
serial monitorLABVIEW SIDE
it works reading (taller.vi)
so finally i add a switch and a visa write, but then the program does not recieve nor send a thing (and doesnt give any error)
taller-02.vi
taller.vi only reads
taller-02.vi try to write
so this is it guys, i really dont know what i'm doing wrong and it's driving me crazy, any help would be appreciated... PLEASE HELP! u.u