Send serial data to vb.net to gw (usb connected)
-
Im use de beta library, i can send data to gw with serial.write("1234") command and show the recieved number. My problem is how can use the incomming data in gw? Im use this example
if (Serial.available() > 0) {
// read the incoming byte:
incomingByte = Serial.read();
// say what you got:
Serial.print("I received: ");
Serial.println(incomingByte, DEC);
}if(SerialValue == 1234){
Serial.print("WORK ");
}The IF command dont work. I try to send commands from vb.net to gw to turn on or off sensor and put auto ID
-
When you want an example of how a controller works you can look at the vera plugin on github.
It is the example that I use as well for my plugin for Indigo.
Make sure you check 'master' out for 1.3 of 'development' for 1.4.
-
@marceltrapman im read de .lua file but if i send the same command lua send like "255;255;3;0;4;2\n" (set radio ID) from vb.net dont work
-
are you using 1.3 or 1.4b?
-
@ch3b7 said:
@marceltrapman im read de .lua file but if i send the same command lua send like "255;255;3;0;4;2\n" (set radio ID) from vb.net don't work
Please make sure (considering your example) that you are using 1.4 and not 1.3 because the ack paramater (in this case 0/false) is not used in 1.3.
And make sure that this really respond to a request.
So in your case you are actually responding to a request for an id?
-
Im use 1.4b. If a sensor ask for id and i put this command in the serial windows in arduino it works. If i send the same command from other program like a custom vb.net nothing happend. I think the gw not listening the incomming serial data from the usb. Sorry for my bad english im from Argentina!
-
@ch3b7 said:
I think the gw not listening the incomming serial data from the usb. Sorry for my bad english im from Argentina!
Ah, you have to use serial-usb. You can not send it to the usb port just like that.
Sorry for my bad english I am Dutch
-
serial-usb adapter?