Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. archiijs
    3. Topics
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Topics created by archiijs

    • archiijs

      Relay on when starting up
      General Discussion • • archiijs  

      9
      0
      Votes
      9
      Posts
      1547
      Views

      archiijs

      @rejoe2 said in Relay on when starting up: really open up a new one, you will never know whether you can reach all of your nodes reliably. Thanks for ideas, I will start to tackle them when I get some free time. Thanks all for input.
    • archiijs

      [SOLVED] Too frequent updates form DHT
      General Discussion • • archiijs  

      14
      0
      Votes
      14
      Posts
      2338
      Views

      archiijs

      Hi @mfalkvidd and others. Yesterday after work I tried to get my head around code suggestions but somehow I cold not make them work so I did some google search and after some time I find something that I implemented in my nodes for testing. Interestingly it works as expected for two of my nodes, but one still keeps jumping around, not that often, but that's still strange, I will compare code to other two to see what I've done wrong there. So I used Hysteresis approach by doing this. #define HYSTERISIS 0.5 // Hysteresis for sensor ... float temperature = dht.getTemperature(); if (isnan(temperature)) { Serial.println("Failed reading temperature from DHT!"); } else if (abs(temperature - lastTemp ) > HYSTERISIS) { // Only send temperature if it changed since the last measurement or if we didn't send an update for n times lastTemp = temperature; if (!metric) { temperature = dht.toFahrenheit(temperature); } And the same for humidity. Still not sure that this will work as expected in long run, but will see. But now it is way better than before. Thanks.