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.2k 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
    • hekH Offline
      hekH 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
        • hekH Offline
          hekH 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
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          11

          Online

          11.7k

          Users

          11.2k

          Topics

          113.0k

          Posts


          Copyright 2019 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