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. Global variables without compile again

Global variables without compile again

Scheduled Pinned Locked Moved Development
4 Posts 3 Posters 931 Views 3 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.
  • Dave DanD Offline
    Dave DanD Offline
    Dave Dan
    wrote on last edited by
    #1

    Hi all,

    I'm trying to find a solution for the following scenario.

    Right now I have deloyed ~10 sensor boxes with Motion, Temperature, Humidity & Light level. All of them working without issue.

    I'd like to find a way to have some variables outside the Arduino Code that I can change in realtime and that Arduinos will use (let's say by restarting) without needed to recompile and flash them.

    My first thinking is to have something in the GW that I can customize and that each and every node will consume.

    I think the usage example will be for Sleep timers. When everything is in 'running mode' well, sleeptimer for Temp & Huidity gathering can be high (let's say 1 measurement every 5 minutes). But if I'm testing something or want to investigate if the system works or something being able to alter this value to 10 seconds would be great

    Not sure if I'm explaining enough what I'm trying to address but please feel free to help me scope it.

    Is there any way I can do this?

    Thanks in advance.

    1 Reply Last reply
    0
    • mfalkviddM Offline
      mfalkviddM Offline
      mfalkvidd
      Mod
      wrote on last edited by
      #2

      I'd say OTA firmware updates is the right solution. OTA provides full flexibility and is fully supported.

      You could get away with custom or text variables (text requires 2.x though) but that means you need to predict all changes you'll want to make.

      1 Reply Last reply
      0
      • Dave DanD Offline
        Dave DanD Offline
        Dave Dan
        wrote on last edited by
        #3

        Actually, now reading the GW code, I think I'm asking for something like the 'metric' variable usually checked in the setup method.

        AWIA 1 Reply Last reply
        0
        • Dave DanD Dave Dan

          Actually, now reading the GW code, I think I'm asking for something like the 'metric' variable usually checked in the setup method.

          AWIA Offline
          AWIA Offline
          AWI
          Hero Member
          wrote on last edited by
          #4

          @Dave-Dan A simple solution would be to create a basic 'test' switch "V_STATUS" for each node.

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


          10

          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