Navigation

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

    Topics created by Ddawme

    • Ddawme

      2 Reed Switches 1 Arduino Nano
      Troubleshooting • • Ddawme  

      6
      0
      Votes
      6
      Posts
      2436
      Views

      mfalkvidd

      @Ddawme great that you found the problem. Thanks for reporting back! Need to keep an extra eye on those pesky technicians
    • Ddawme

      Library 2.0 - No Humidity sketch
      Troubleshooting • • Ddawme  

      8
      0
      Votes
      8
      Posts
      1430
      Views

      Tagore.PDE

      // Enable debug prints to serial monitor #define MY_DEBUG // Enable and select radio type attached #define MY_RADIO_NRF24 //#define MY_RADIO_RFM69 //Including nescessary libraries #include <SPI.h> #include <MySensors.h> #include <DHT.h> #define HUMIDITY 1 #define TEMPERATURE 2 #define HUMIDITY_SENSOR_DIGITAL_PIN 3 DHT dht; float lastTempValue; float lastHumValue; boolean metric = true; unsigned long SLEEP_TIME = 30000; // Sleep time between reads (in milliseconds)(30 seconds) #define MESSAGEWAIT 500 MyMessage msgHum(HUMIDITY, V_HUM); MyMessage msgTemp(TEMPERATURE, V_TEMP); void presentation() { // Send the sketch version information to the gateway and Controller sendSketchInfo("XXXX", "XX"); wait(MESSAGEWAIT); // Register all sensors to gateway (they will be created as child devices) present(HUMIDITY, S_HUM); wait(MESSAGEWAIT); present(TEMPERATURE, S_TEMP); wait(MESSAGEWAIT); } void setup() { dht.setup(HUMIDITY_SENSOR_DIGITAL_PIN); } void loop() { delay(dht.getMinimumSamplingPeriod()); float temperature = dht.getTemperature(); if (isnan(temperature)) { Serial.println("Failed reading temperature from DHT"); } else if (temperature != lastTempValue) { send(msgTemp.set(temperature, 1)); lastTempValue = temperature; Serial.print("Temp: "); Serial.println(temperature); } float humidity = dht.getHumidity(); if (isnan(humidity)) { Serial.println("Failed reading humidity from DHT"); } else if (humidity != lastHumValue) { send(msgHum.set(humidity, 1)); lastHumValue = humidity; Serial.print("Hum: "); Serial.println(humidity); } sleep(SLEEP_TIME); }
    • Ddawme

      MySensors Library
      Troubleshooting • • Ddawme  

      5
      0
      Votes
      5
      Posts
      2088
      Views

      mfalkvidd

      Great work @Ddawme, thanks for reporting back