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. Development
  3. Send data to other sensor

Send data to other sensor

Scheduled Pinned Locked Moved Development
8 Posts 4 Posters 2.9k Views 1 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.
  • ch3b7C Offline
    ch3b7C Offline
    ch3b7
    wrote on last edited by
    #1

    Can I send data to other sensors directly from the arduino serial window?

    hekH 1 Reply Last reply
    0
    • ch3b7C ch3b7

      Can I send data to other sensors directly from the arduino serial window?

      hekH Offline
      hekH Offline
      hek
      Admin
      wrote on last edited by
      #2

      @ch3b7

      The gateway is the only place where you can send out data via serial window. The Sensor-class does not listen to serial input.

      But it is a two-liner to send a value (1.4 example below).

      MyMessage msg = new MyMessage(<chidldSensorId>,<dataType>).setDestination(<destinationNode>).set(<value>);
      gw.send(msg);
      
      YveauxY 1 Reply Last reply
      0
      • ch3b7C Offline
        ch3b7C Offline
        ch3b7
        wrote on last edited by
        #3

        This example work in 1.4b1 (18848a2) ?

        1 Reply Last reply
        0
        • hekH hek

          @ch3b7

          The gateway is the only place where you can send out data via serial window. The Sensor-class does not listen to serial input.

          But it is a two-liner to send a value (1.4 example below).

          MyMessage msg = new MyMessage(<chidldSensorId>,<dataType>).setDestination(<destinationNode>).set(<value>);
          gw.send(msg);
          
          YveauxY Offline
          YveauxY Offline
          Yveaux
          Mod
          wrote on last edited by
          #4

          @hek said:

          MyMessage msg = new MyMessage(<chidldSensorId>,<dataType>).setDestination(<destinationNode>).set(<value>);
          gw.send(msg);
          

          This will not compile, as the new()-operator returns a pointer to a MyMessage object.
          Better to compress the whole to:

          gw.send( MyMessage(<chidldSensorId>,<dataType>).setDestination(<destinationNode>).set(<value>) );
          

          http://yveaux.blogspot.nl

          jendrushJ 1 Reply Last reply
          0
          • ch3b7C Offline
            ch3b7C Offline
            ch3b7
            wrote on last edited by
            #5

            can i put values like this "gw.send( MyMessage("1","3").setDestination("2").set("1") );" ?

            1 Reply Last reply
            0
            • YveauxY Yveaux

              @hek said:

              MyMessage msg = new MyMessage(<chidldSensorId>,<dataType>).setDestination(<destinationNode>).set(<value>);
              gw.send(msg);
              

              This will not compile, as the new()-operator returns a pointer to a MyMessage object.
              Better to compress the whole to:

              gw.send( MyMessage(<chidldSensorId>,<dataType>).setDestination(<destinationNode>).set(<value>) );
              
              jendrushJ Offline
              jendrushJ Offline
              jendrush
              wrote on last edited by
              #6

              @Yveaux Could you write sample messages to send from node, and receive value on another?

              YveauxY 1 Reply Last reply
              0
              • jendrushJ jendrush

                @Yveaux Could you write sample messages to send from node, and receive value on another?

                YveauxY Offline
                YveauxY Offline
                Yveaux
                Mod
                wrote on last edited by
                #7

                @jendrush do you want some example code? I don't understand...

                http://yveaux.blogspot.nl

                jendrushJ 1 Reply Last reply
                0
                • YveauxY Yveaux

                  @jendrush do you want some example code? I don't understand...

                  jendrushJ Offline
                  jendrushJ Offline
                  jendrush
                  wrote on last edited by
                  #8

                  @Yveaux Yes, example messages. Something like that - i have temperature from dht22 on one node, and i want to send this value to example node with radio id 2. Second thing, how to pick this value on radio node with id 2?

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  9

                  Online

                  11.7k

                  Users

                  11.2k

                  Topics

                  113.1k

                  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