Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. General Discussion
  3. Basic Setup Network

Basic Setup Network

Scheduled Pinned Locked Moved General Discussion
2 Posts 2 Posters 1.0k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • aaronik19A Offline
    aaronik19A Offline
    aaronik19
    wrote on last edited by
    #1

    Sorry I know that I am writing a stupid question but I am a little bit confused. I am trying to make a very basic node to node program; from one NRF24 to another NRF24. Send command from 1 module to light LED on the other module. I read more than twice the API (http://www.mysensors.org/download/sensor_api_15) but still get ground! Is there a basic network please to light led on the other side and I will continue from there please?

    Sorry once again, but I really need some help to get on.

    1 Reply Last reply
    0
    • noelgeorgiN Offline
      noelgeorgiN Offline
      noelgeorgi
      wrote on last edited by noelgeorgi
      #2

      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
      1 Reply Last reply
      1

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      18

      Online

      12.0k

      Users

      11.2k

      Topics

      113.4k

      Posts


      Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • MySensors
      • OpenHardware.io
      • Categories
      • Recent
      • Tags
      • Popular