Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. Karol Rynio
    3. Posts
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by Karol Rynio

    • RE: [SOLVED] MY_NODE_ID is ignored

      Ok, thanks.

      posted in Development
      Karol Rynio
      Karol Rynio
    • [SOLVED] MY_NODE_ID is ignored

      Hi.
      I created my first sketch using arduino, but I have a problem because I define manually MY_NODE_ID but it is ignored. When I upload my sketch to arduino and run serial monitor I receive messages:

      0;255;3;0;14;Gateway startup complete.
      0;255;0;0;17;2.1.1
      0;101;0;0;3;
      

      and here is information that mo node id is 0, but in source code I define it as 3. Below is source code:

      #define MY_NODE_ID 3
      #define MY_GATEWAY_SERIAL
      
      #include <SPI.h>
      #include <MySensors.h>
      
      
      //...
      #define RELAY_PIN  5
      #define CHILD_ID 101
      // ...
      
      MyMessage msg(CHILD_ID, V_STATUS);
      
      void setup()
      {
        pinMode(RELAY_PIN, OUTPUT);
      }
      
      void presentation()  {
        present(CHILD_ID, S_BINARY);
      }
      
      void loop()
      {
        // ...
      }
      
      void receive(const MyMessage &message) {
        // ...
      }
      

      Why MY_NODE_ID have different VALUE than I declare?

      posted in Development
      Karol Rynio
      Karol Rynio