Can't send message over arduino serial monitor



  • Ok so I have got a few questions and a problem to solve
    I have two arduino unos hooked up with the nrf24l01+ one is running the (arduino button relay) and the other is running the (serial gateway) examples. Once I plug the sensors in I Ioad arduino running the gateway into the serial moniter and it gives me the normal "0;0;3;0;14;Gateway start up complete." then I turn on the (relay button arduino) and it gives me a confirming
    "105;255;0;0;18;1.4.1
    0;0;3;0;9;read: 105-105-0 s=255,c=3,t=6,pt=1,l=1:0
    105;255;3;0;6;0
    0;0;3;0;9;read: 105-105-0 s=255,c=3,t=11,pt=0,l=14:Relay & Button
    105;255;3;0;11;Relay & Button
    0;0;3;0;9;read: 105-105-0 s=255,c=3,t=12,pt=0,l=3:1.0
    105;255;3;0;12;1.0
    0;0;3;0;9;read: 105-105-0 s=1,c=0,t=3,pt=0,l=5:1.4.1
    105;1;0;0;3;1.4.1"

    So, I have good connection and the node is all set up. So then I try and give the node a command to turn on or off, so I type into the serial monitor
    105;1;1;1;2;1\n
    or 105;1;1;1;2;0\n
    or 105;1;0;1;2;1\n
    or 105;1;1;0;2;0\n
    or 105;0;1;1;2;1\n
    or 105;0;1;1;2;0\n
    just about every variation that you could imagine and nothing.
    The biggest question I have is, Am i supposed to type anything in before 105;1;1;1;2;1\n ?
    Is there a method that I am supposed to call up? I am writing directly into the serial monitor form the arduino ide, and am running the 1.4 library of Mysensors. Is there supposed to be anything else with the message"105;1;1;1;2;1\n" to help this message to compute to the relay?
    thanks?



  • This post is deleted!


  • the funny thing is I know the everything is hooked up right because everything works through a controller? Has anyone else tried to get this to work just through the serial monitor?


  • Admin

    What is you newline/cr setting in serial monitor?

    Are you actually typing \n ?

    \n == enter/carriage return



  • The setting has been "No line Ending" And I tried typing it in both ways with the \n and without (105;1;1;1;2;1\n and 105;1;1;1;2;1). What setting should I be in in the serial monitor and what should I type into the serial monitor?
    Thank you so much for responding, I am really interested in all this and it looks like you guys have done such a great job! Thanks!


  • Admin

    The serial monitor setting should be set to "with line ending".

    You should not typ "\n"!
    It means that you should press enter on your keyboard.


  • Hero Member

    Hello,

    2015-01-28 10:36:55 9 255 0 0 18 1.4.1
    2015-01-28 10:36:55 9 255 3 0 6 0
    2015-01-28 10:36:56 9 255 3 0 11 Relay
    2015-01-28 10:36:56 9 255 3 0 12 1.0
    2015-01-28 10:36:56 9 1 0 0 3 1.4.1
    

    I can send this:

    echo "9;3;1;0;2;1\n" >> /dev/ttyUSB0
    

    On the device serial line I see:

    read: 0-0-9 s=3,c=1,t=2,pt=0,l=3:1\n
    Incoming change for sensor:3, New status: 1

  • Hero Member

    You should not typ "\n"!
    It means that you should press enter on your keyboard.

    On Linux I saw that I have to send "\r\n" instead of "\n".
    "\r\n" (Carriage return, Line feed) is the Windows return, "\n" only the Linux return.



Suggested Topics

3
Online

11.2k
Users

11.1k
Topics

112.5k
Posts