Navigation

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

    Topics created by aaronik19

    • aaronik19

      Basic Setup Network
      General Discussion • • aaronik19  

      2
      0
      Votes
      2
      Posts
      807
      Views

      noelgeorgi

      this is my node to node program: // Enable debug prints #define MY_DEBUG #define SWITCH_PIN 2 // Enable and select radio type attached #define MY_RADIO_NRF24 //#define MY_RADIO_RFM69 boolean state=false; #include <SPI.h> #include <MySensor.h> #define MY_NODE_ID 10 #define CHILD_ID_SWITCH 1 MyMessage switchMsg(CHILD_ID_SWITCH, V_LIGHT); void setup() { pinMode(SWITCH_PIN,INPUT_PULLUP); } void loop() { if(digitalRead(SWITCH_PIN)==LOW) { delay(100); if(digitalRead(SWITCH_PIN)==HIGH); { state=!state; if(state) { send(switchMsg.setDestination(2).set(49)); } else { send(switchMsg.setDestination(2).set(0)); } } } } destination node id is 2 destination of type light variable
    • aaronik19

      serial monitor
      General Discussion • stbc sg0 pt0 • • aaronik19  

      3
      0
      Votes
      3
      Posts
      684
      Views

      sundberg84

      Hi! Find parent means the node is trying to find its way to the gateway - and if this repeats it cant. Its either a range issue or a power issue. You can start by checking the gateway serial log and see if there is any info. Also, have you added a capacitor on the radios? This is very important since the radio is sensitive to power spikes. It this doesnt work start with changing the power source and check your wirings / ground connection on the node. Also you can try to move the node closer to the gateway - if this works and you have some distance between node and gateway you should consider a repeater.