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. Reading message from principal sketch.

Reading message from principal sketch.

Scheduled Pinned Locked Moved Development
4 Posts 2 Posters 1.5k 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.
  • M Offline
    M Offline
    miguelingles
    wrote on last edited by
    #1

    I'm watching to program from the same gateway program some basic functions (without using other external controller).
    Anyone know how to read the messages as they arrive .

    1 Reply Last reply
    0
    • H Offline
      H Offline
      hek
      Admin
      wrote on last edited by
      #2

      :confused:

      Read that a few times but couldn't understand what you want to do.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        miguelingles
        wrote on last edited by
        #3

        I want to write a function in a esp8266 gateway that allows to act directly on a sensor.
        EXAMPLE:

        READ temperature sensor data 0;0;3;0;9;read: 10-10-0 s=0,c=1,t=0,pt=7,l=5,sg=0:24.6
        ------- If greater than 25 temp send 10; 10; x; x; X

        1 Reply Last reply
        0
        • H Offline
          H Offline
          hek
          Admin
          wrote on last edited by hek
          #4

          Ok, the use the development branch. And something like:

          MyMessage msg(1,V_TEMP);
          int temp; 
          
          void presentation() {
             present(1,S_TEMP);
          }
          
          void loop() {
             temp = READ_TEMP_FROM_SOME_SOURCE;
             if (temp>25) 
               send(msg.set(temp));
          
             wait(10000);
          }
          
          
          1 Reply Last reply
          0

          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