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. -
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. -
are you using 1.3 or 1.4b?
-
@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
@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!
-
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 ;)
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login