Help to Beginner..



  • Hi all .
    I'm beginner for Arduino and MySensor too..
    I searching any open-source star or mesh network with nRF24L01+ and find MySensor .
    It's look good .. then I try it ..

    Here is my sensor dev board ..
    IMAG1232.jpg
    and here is my schematic..
    SensorBoard1.png
    I try in my Serial Gateway this sketch: SerialGateway with internal 8Mhz RC oscilator .. in my serial port terminal set COM15 (my COM port) and set speed 115200 .. after power Up my gateway then I receive this :
    0;0;3;0;14;Gateway startup complete.

    Then to my sensor upload sketch : BinarySLeepSwitchSensor and powr up .. and in my terminal receive this :
    0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:255;255;3;0;3;
    But if push button for INT0 or INT1 still receive same data ..
    What is wrong ..
    Then I have this question:

    1. Where I can find more information about serial protocol ... what does mean data from gateway?
    2. I want run my sensor board with 32kHz crystal in TIMER2 ... where is any example .. Sleep and wake up every predefined time ..
    3. Is possible make network with more Repeater Node in serial .. for example gateway<->repeater1<->repeater2<->repeater3<->My Sensor
    4. Where I can find more informatioin about protocol .. if want make own code for sensor .. but not in arduino platform .. but for AVR Studio (GCC .. WinAVR) ..

    In my sensor use NTC temperature sensor and 32kHz crystal .. and my power consumption is 10uA ... TIMER2 is every 1sec wakeup.. Then I want make own code if is possible ..

    regards.


  • Hero Member

    On:

    Where I can find more information about serial protocol ... what does mean data from gateway?

    Have a look at http://www.mysensors.org/build/serial_api

    Where I can find more information about protocol .. if want make own code for sensor .. but not in arduino platform .. but for AVR Studio (GCC .. WinAVR) ..

    You can download and probably did download the source code from github so why don't you try to get that working on the AVR Studio?



  • You will find the API/Sensor/Gateway info here:

    http://mysensors.org/build/sensor_api



  • Ehm.. I read this help but still can not decode string format..
    0;0;3;0;14;Gateway startup complete. in original serial communication example is 6 value in string : 12;6;0;0;3;1.4\n
    But I received only 5 ...
    and if received data : read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:255;255;3;0;3;
    what is : 255-255-0 and : s=255,c=3,t=3,pt=0,l=0
    I don't find any place where can read what is it ..

    Pls answer here ... decode my serial data ..

    Ehm... if I push another button .. INT0 or INT1 still received same data .. where is problem..
    and I have connected LED to PD0 and PD1 (UART) .. and after power ON code inicialize UART and set output to PD1 (TX pin) how to disable this pin???

    regards.


  • Hero Member

    in original serial communication example is 6 value in string : 12;6;0;0;3;1.4\n
    But I received only 5 ...

    The 6th "value" is the payload, see Message Structure Elements at http://www.mysensors.org/build/serial_api, just like "Gateway startup complete." is the payload for the "0;0;3;0;14;Gateway startup complete. " message.

    node-id;child-sensor-id = 255;255 means something like broadcast. It is for example used for nodes that do not have an address yet.

    Lines starting with "read: " are strictly no protocol messages, they are debug output of the gateway.



  • Hi daulagari.
    Thanks for your help.
    Now little understand...
    But what is this :255-255-0 s=255,c=3,t=3,pt=0,l=0: this are just debug information?
    and this is my packet ? 255;255;3;0;3; still is only 5 argument .. where is 6-argument ? payload?
    what is s=255 , or c=3 , pt=0 , l=0 ... where I can finid more information about this ?

    thanks ... regards...

    PS: where I can find more inforation about structure of communication between sensor and gateway , repeater?



  • and ... still not answer why sensor don't send informatioin what button I pushed INT0 or INT1


  • Admin

    @dzairo

    and this is my packet ? 255;255;3;0;3; still is only 5 argument .. where is 6-argument ? payload?

    that is the sensor node requesting an address. Either reply with 255;255;3;0;4;1, this instructs the node that it should use address 1. Or initialize the sensor framework in the sensor node with a hardcoded address (look at gw.begin in the documentation area)

    If the node is not assigned an address, it will not send any other sensor data.


  • Hero Member

    what is s=255 , or c=3 , pt=0 , l=0 ... where I can finid more information about this ?

    AFAIK this is not documented somewhere .. apart from the source files.



  • Hi.... hehe... I must decode it from source code?? hmmmm... interesting...
    where I need to write my question?

    1. power down mode .. every 1 sec wake up .. using timer2 32kHy crystal
      2.make sensor with more sensor type in one device .. for example .. temperature , energy meter, bin input state.. etc..

Log in to reply
 

Suggested Topics

74
Online

11.4k
Users

11.1k
Topics

112.7k
Posts