Can't control actuator
-
@nono056 said:
OK for the serial Gateway.
My radios communicate really. I test it with a ds18b20 and i have my temperature (thanks for yesterday!!!)
I've just activate the debug and it says :
0;0;4;11;Arduino startup complete.
0;0;4;11;Message available on pipe 1
0;0;4;11;Sent ack msg to 42
0;0;4;11;Rx: fr=42,to=0,la=42,ci=255,mt=0,t=17,cr=166(ok): 1.3b3 (18
0;0;4;11;Message addressed for this node.
42;255;0;17;1.3b3 (18848a2)
0;0;4;11;Message available on pipe 1
0;0;4;11;Sent ack msg to 42
0;0;4;11;Rx: fr=42,to=0,la=42,ci=255,mt=4,t=7,cr=234(ok): 0
42;255;4;7;0
0;0;4;11;Message available on pipe 1
0;0;4;11;Sent ack msg to 42
0;0;4;11;Rx: fr=42,to=0,la=42,ci=255,mt=4,t=14,cr=83(ok): Relay
42;255;4;14;Relay
0;0;4;11;Message available on pipe 1
0;0;4;11;Sent ack msg to 42
0;0;4;11;Rx: fr=42,to=0,la=42,ci=255,mt=4,t=15,cr=97(ok): 1.0
42;255;4;15;1.0
0;0;4;11;Message available on pipe 1
0;0;4;11;Sent ack msg to 42
0;0;4;11;Rx: fr=42,to=0,la=42,ci=1,mt=0,t=3,cr=37(ok): 1.3b3 (18848a
0;0;4;11;Message addressed for this node.
42;1;0;3;1.3b3 (18848a2)I don't see anything when i send this : 42;3;1;2;0
I think my numbers are good
I don't understand why it doesn't work :-( -
I've tested with an another computer near the first (1 meter)
the only things i see in this serial monitor (the relay or led node) i have this :Started sensor.
Relay=0, distance=1
Relaying message back to gateway.
Tx: fr=42,to=0,la=42,ne=0,ci=255,mt=0,ty=17,cr=166: 1.3b3 (18848a2)
Ack: received OK
Relaying message back to gateway.
Tx: fr=42,to=0,la=42,ne=0,ci=255,mt=4,ty=7,cr=234: 0
Ack: received OK
Relaying message back to gateway.
Tx: fr=42,to=0,la=42,ne=0,ci=255,mt=4,ty=14,cr=83: Relay
Ack: received OK
Relaying message back to gateway.
Tx: fr=42,to=0,la=42,ne=0,ci=255,mt=4,ty=15,cr=97: 1.0
Ack: received OK
Relaying message back to gateway.
Tx: fr=42,to=0,la=42,ne=0,ci=1,mt=0,ty=3,cr=37: 1.3b3 (18848a2)
Ack: received OKnothing when the gateway send this : 42;3;1;2;0
I have inverted the two nrf24l01 and it is the same
Any idea? -
Looks like your communication is working (in one direction at least).
What is your setting in serial console (Newline?) when you send commands?
Is the gateway really sending anything? After entering your command in the serial console you should see a Tx: ....... -
@nono056 said:
I use arduino ide for serial communication.
I write 42;3;1;2;0 in the serial send line and clic on Send.
Nothiing appears.
For debugging, i had Serial.println(inputString); at the end of serialEvent funtion for testing what i was sending
and i have this appearing :
0;0;4;11;Arduino startup complete.
4
42
42;3
42;3;
42;3;1;
42;3;1;2;
42;3;1;2;0No tx line...
-
@nono056 said:
42;3;1;2;0
I have found where is the error!
In the SerialGateway sketch, if we use the serial monitor with arduino IDE (with my PC), there isn't a "\n" char who is send.
i have to change this in the sketch with z.
now it function!!so the new serialEvent function is :
void serialEvent() {
while (Serial.available()) {
// get the new byte:
char inChar = (char)Serial.read();
// if the incoming character is a newline, set a flag
// so the main loop can do something about it:
if (inputPos<MAX_RECEIVE_LENGTH-1 && !commandComplete) {
if (inChar == 'z') {
inputString[inputPos] = 0;
commandComplete = true;
} else {
// add it to the inputString:
inputString[inputPos] = inChar;
inputPos++;
}} else { // Incoming message too long. Throw away inputPos = 0; }}
}and to activate my led (or relay), i use this line : 42;3;1;2;0z in the serial monitor on arduino
Is it my PC, the Arduino serial monitor or the script which isn't atapted with this tools?
i don't know...Et voila for the solution (for my problem in fact)
thanks for all! -
That is why I asked the following:
What is your setting in serial console (Newline?) when you send commands?
