Skip to content
  • 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
C

chuckconnors

@chuckconnors
  • Getting Started
  • Controller
  • Build
  • Hardware
  • Download/API
  • Forum
  • Store
About
Posts
56
Topics
11
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • 💬 Infrared Sender and Receiver
    C chuckconnors

    @Reza said:

    this module ( ir transmitter ) is weak in transmit . for more than 2 or 3 meter distance dont work . also for less than 1 meter we must direct connection exactly.
    i think this is related to power or noise or problem of module ?!
    can you guidance me ?

    I'm thinking of building this but am concerned about limited range. I'd like it to work 10ft/3m. Can someone confirm that this does not work at these distances? If so, is there a way to increase the range?

    Announcements

  • ATtiny supported?
    C chuckconnors

    @tlustoch said:

    Any progress? I like to build simple low-power temperature sensor based on attiny85 but cannot compile mysensors sketch if attiny85 set as a processor :(

    I've switched over to the ESP8266 runing ESPEasy firmware. Very cheap and very easy to use.

    Hardware

  • Can't compile Humidity sketch 2.0 .. What DHT library do I need?
    C chuckconnors

    @sundberg84 said:

    @chuckconnors - BMP180 or Bmp280 for example.

    Those appear to be atmospheric pressure sensors. Looking for humidity sensors other than the DHT11/DHT22.

    General Discussion

  • Can't compile Humidity sketch 2.0 .. What DHT library do I need?
    C chuckconnors

    @sundberg84 said:

    @AWI probably because its mentioned in the build page? But i agree - I now know as well there is better out there.

    Can you tell me what better sensors are out there? These DHT11's I have vary wildly with regards to relative humidity.

    General Discussion

  • OpenHAB not assigning node id
    C chuckconnors

    I just built two new Humidity/Temp/Motion sensors. I'm using OpenHAB 1.3.8 with Mysensors 1.5.1

    I can see that things are working okay in Arduino IDE:

    req id
    send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
    sensor started, id=255, parent=0, distance=1
    req id
    send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
    req id
    send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
    req id
    send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
    req id
    send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
    req id
    send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
    0
    req id
    send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
    req id
    send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
    T: 80.60
    req id
    send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
    H: 40.00
    
    

    Netcat to my ethernet gateway shows this:

    root@debian#  nc 192.168.0.99 5003
    255;255;3;0;3;
    255;255;3;0;3;
    255;255;3;0;3;
    255;255;3;0;3;
    255;255;3;0;3;
    255;255;3;0;3;
    255;255;3;0;3;
    255;255;3;0;3;
    

    OpenHAB is receiving information from my other Mysensors nodes and those values update. I am not seeing anything in the logs about the new sensors not being assigned. It's like it's not seeing them.

    Can anyone help?

    OpenHAB

  • Can't compile Humidity sketch 2.0 .. What DHT library do I need?
    C chuckconnors

    @tbowmo said:

    @chuckconnors

    if you look at the "examples" repository, it both examples folder, and libraries that should work with the enclosed examples. Copy the library, that you want to use, to Arduino/libraries/... and the example to Arduino/... and try to compile them.

    HOLY SMOKES! I totally missed the libraries directory. Thank you and sorry for the troubles.

    General Discussion

  • Can't compile Humidity sketch 2.0 .. What DHT library do I need?
    C chuckconnors

    @AWI said:

    @chuckconnors this is what I found as a working example on my system. I still don't understand why the DHT keeps being so popular. There are much better temp/hum sensors around..... But anyway, this one should work.

    Installation
    ------------
    
    Place the [DHT][download] library folder in your `<arduinosketchfolder>/libraries/` folder. You may need to create the `libraries` subfolder if its your first library. Restart the Arduino IDE. 
    
    [download]: https://github.com/markruys/arduino-DHT/archive/master.zip "Download DHT library"
    [example]: https://github.com/markruys/arduino-DHT/blob/master/examples/DHT_Test/DHT_Test.pde "Show DHT example"
    [header]: https://github.com/markruys/arduino-DHT/blob/master/DHT.h "Show header file"```
    

    Thanks for the reply. I'm pretty sure that's one of the ones I tried. I ended up finding an old install I had and copied the library from there and it's working now.

    General Discussion

  • Can't compile Humidity sketch 2.0 .. What DHT library do I need?
    C chuckconnors

    Can someone please look at their libraries and tell me which one I need to use? Apparently installing Arduino IDE does not install this library by default and all the ones I've tried have failed. I don't see any documentation on which one to use.

    I've got a handful of sensors built but I can't program them until I get this resolved. I really appreciate your time and help. Thanks!

    General Discussion

  • Can't compile Humidity sketch 2.0 .. What DHT library do I need?
    C chuckconnors

    I'm trying to compile the Humidity sketch 2.0 and am getting an error. Here's the sketch I'm using:

    https://raw.githubusercontent.com/mysensors/MySensorsArduinoExamples/master/examples/HumiditySensor/HumiditySensor.ino

    /**
     * The MySensors Arduino library handles the wireless radio link and protocol
     * between your home built sensors/actuators and HA controller of choice.
     * The sensors forms a self healing radio network with optional repeaters. Each
     * repeater and gateway builds a routing tables in EEPROM which keeps track of the
     * network topology allowing messages to be routed to nodes.
     *
     * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
     * Copyright (C) 2013-2015 Sensnology AB
     * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
     *
     * Documentation: http://www.mysensors.org
     * Support Forum: http://forum.mysensors.org
     *
     * This program is free software; you can redistribute it and/or
     * modify it under the terms of the GNU General Public License
     * version 2 as published by the Free Software Foundation.
     *
     *******************************
     *
     * REVISION HISTORY
     * Version 1.0 - Henrik EKblad
     * 
     * DESCRIPTION
     * This sketch provides an example how to implement a humidity/temperature
     * sensor using DHT11/DHT-22 
     * http://www.mysensors.org/build/humidity
     */
     
    // Enable debug prints
    //#define MY_DEBUG
    
    // Enable and select radio type attached
    #define MY_RADIO_NRF24
    //#define MY_RADIO_RFM69
    
    #include <SPI.h>
    #include <MySensors.h>  
    #include <DHT.h>  
    
    #define CHILD_ID_HUM 0
    #define CHILD_ID_TEMP 1
    #define HUMIDITY_SENSOR_DIGITAL_PIN 3
    unsigned long SLEEP_TIME = 30000; // Sleep time between reads (in milliseconds)
    
    DHT dht;
    float lastTemp;
    float lastHum;
    boolean metric = true; 
    MyMessage msgHum(CHILD_ID_HUM, V_HUM);
    MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);
    
    void setup()  
    { 
      dht.setup(HUMIDITY_SENSOR_DIGITAL_PIN); 
    
      metric = getConfig().isMetric;
    }
    
    void presentation()  
    { 
      // Send the Sketch Version Information to the Gateway
      sendSketchInfo("Humidity", "1.0");
    
      // Register all sensors to gw (they will be created as child devices)
      present(CHILD_ID_HUM, S_HUM);
      present(CHILD_ID_TEMP, S_TEMP);
    }
    
    void loop()      
    {  
      delay(dht.getMinimumSamplingPeriod());
     
      // Fetch temperatures from DHT sensor
      float temperature = dht.getTemperature();
      if (isnan(temperature)) {
          Serial.println("Failed reading temperature from DHT");
      } else if (temperature != lastTemp) {
        lastTemp = temperature;
        if (!metric) {
          temperature = dht.toFahrenheit(temperature);
        }
        send(msgTemp.set(temperature, 1));
        #ifdef MY_DEBUG
        Serial.print("T: ");
        Serial.println(temperature);
        #endif
      }
      
      // Fetch humidity from DHT sensor
      float humidity = dht.getHumidity();
      if (isnan(humidity)) {
          Serial.println("Failed reading humidity from DHT");
      } else if (humidity != lastHum) {
          lastHum = humidity;
          send(msgHum.set(humidity, 1));
          #ifdef MY_DEBUG
          Serial.print("H: ");
          Serial.println(humidity);
          #endif
      }
      
      sleep(SLEEP_TIME); //sleep a bit
    }
    

    The error I'm getting is this:

    
    Arduino: 1.6.6 (Windows 7), Board: "Arduino Pro or Pro Mini, ATmega328 (3.3V, 8 MHz)"
    
    C:\Users\User\Documents\Arduino-new\sketch_jul17e\sketch_jul17e.ino:39:19: fatal error: DHT.h: No such file or directory
    
     #include <DHT.h>  
    
                       ^
    
    compilation terminated.
    
    exit status 1
    Error compiling.
    
    

    I noticed a case sensitive issue so I changed DHT.h to dht.h and I get a bit further but then hit an error on line:

    DHT dht;
    
    

    I changed that to dht dht; and get a bit further still:

    Arduino: 1.6.6 (Windows 7), Board: "Arduino Pro or Pro Mini, ATmega328 (3.3V, 8 MHz)"
    
    C:\Users\User\Documents\Arduino-new\sketch_jul17e\sketch_jul17e.ino: In function 'void setup()':
    
    sketch_jul17e:55: error: 'class dht' has no member named 'setup'
    
       dht.setup(HUMIDITY_SENSOR_DIGITAL_PIN); 
    
           ^
    
    C:\Users\User\Documents\Arduino-new\sketch_jul17e\sketch_jul17e.ino: In function 'void loop()':
    
    sketch_jul17e:72: error: 'class dht' has no member named 'getMinimumSamplingPeriod'
    
       delay(dht.getMinimumSamplingPeriod());
    
                 ^
    
    sketch_jul17e:75: error: 'class dht' has no member named 'getTemperature'
    
       float temperature = dht.getTemperature();
    
                               ^
    
    sketch_jul17e:81: error: 'class dht' has no member named 'toFahrenheit'
    
           temperature = dht.toFahrenheit(temperature);
    
                             ^
    
    sketch_jul17e:91: error: 'class dht' has no member named 'getHumidity'
    
       float humidity = dht.getHumidity();
    
                            ^
    
    exit status 1
    'class dht' has no member named 'setup'
    
    

    As you've probably guessed, I'm just trying things to see if I can get it to work. I'm guessing it's a library thing and could use some guidance as to what library I should be using. Thanks!

    General Discussion

  • Codebender motion sketch compile error
    C chuckconnors

    @tbowmo Sorry. I was unclear. I don't mind using the Arduino IDE on my windows machine, but I don't know how to install the correct libraries to use the legacy code. Either that or is there a temp/humidity example sketch for 2.0? I can't find one in the code examples and I don't know what needs to be modified from the older version to make it work with 2.0. Just changing the include name is not enough.

    General Discussion

  • Codebender motion sketch compile error
    C chuckconnors

    @tbowmo Still very unclear how this works. I'm assuming that codebender is self contained and that I should be able to use it to upload code to my arduino . I understand that this may be outdated, but it should still work right?

    At this point I'm just trying to find some way to upload a temp/humidity sketch to my node and I'm having a heck of time getting things working.

    I don't really care if I use 2.0 or an older version, but I'm not seeing a 2.0 example of the temp/humidity sketch. Does one exist?

    General Discussion

  • Codebender examples don't match Arduino library examples?
    C chuckconnors

    @tbowmo Thanks for the reply. I'm still a newbie with all this. I think that I have 2.0 installed but most of the code examples I see or have used in the past are not 2.0 . Can you tell me how to install the older library and get rid of the newer one?

    Basically I'd just like to be able to upload the code I've used before to the new nodes.

    General Discussion

  • Codebender examples don't match Arduino library examples?
    C chuckconnors

    Hey guys.. I'm having a good bit of confusion. I'm trying to get a combination temperature/humidity/motion sensor node going and am running into all kinds of road blocks. I've downloaded the Arduino library and am able to compile and upload example files without problems.

    I do not see the humidity/temp sketch listed in the examples (perhaps it's named in a different way?). I tried copying the example from the build page and it won't compile. I see that it tries to include like this

    #include <MySensor.h>  
    

    where the example sketches include like this:

    #include <MySensors.h>  
    

    I'm not a programmer but I have built some of these sensors successfully in the past and would like to add a few more sensors. Can someone tell me what I'm doing wrong and also possibly link to a working example of the humidity temp node?

    General Discussion

  • Codebender motion sketch compile error
    C chuckconnors

    @hek said:

    That's strange... did you clone the sketch together with library? Are you having some old MySensors version in your account?

    I'm back at this and am totally confused. I thought that the codebender site would have the updated MS code and examples. Do I need to do something specifically to get it to work with my account? I'm trying to upload the humidity sensor sketch and am getting this error:

    
    (sketch file) HumiditySensor.ino:40:5: error: no matching constructor for initialization of 'DHT'
    
    DHT dht;
        ^
    (library file) DHT/DHT.h:31:3: note: candidate constructor not viable: requires at least 2 arguments, but 0 were provided
      DHT(uint8_t pin, uint8_t type, uint8_t count=6);
      ^
    (library file) DHT/DHT.h:23:7: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 0 were provided
    class DHT {
          ^
    

    I do have the Arduino IDE installed but it seems to be all messed up. I'm trying to uninstall it and get it working again. I'm not sure how I munged it up but I have no way to upload MS stuff. Any help is greatly appreciated. I only have a small window of time to work on these side projects so any help is really appreciated.

    General Discussion

  • 💬 Easy/Newbie PCB for MySensors
    C chuckconnors

    @sundberg84 Thanks. Another dumb question: What is the difference between the RAW ad the PWR pads and when should I use one rather than the other?

    OpenHardware.io mysensors battery easy newbie pcb mysx

  • 💬 Easy/Newbie PCB for MySensors
    C chuckconnors

    Another real quick question. I have a simple sensor using a DHT11. I have this connected to D3 for signal and power and ground from the right holes. I'm getting an error saying it can't read temp/hum from the DHT. That set up should be right though? I also have a 4.7k ohm resistor in the board for D3 (that's the pin, right?).

    OpenHardware.io mysensors battery easy newbie pcb mysx

  • "Washing machine ended" sensor
    C chuckconnors

    @Moshe-Livne Thanks for posting this. I definitely plan on trying this for my washer but am curious if you think that it would work for the dryer as well. Is the SW-420 sensitive enough to be able to detect the more subtle movement of the dryer?

    My Project

  • 💬 Easy/Newbie PCB for MySensors
    C chuckconnors

    @sundberg84
    @BastienVH said:

    @sundberg84 said:

    If you use the FTDI connector, make sure its the 3.3v and connect it to Gnd/Pwr on the PCB and not Arduino FDTI connector.
    You could just exclude those pins and connect a battery directly and use that as power and the FDTI as programmer/serial debug only

    Bat or Reg is nessecary!
    See this picture for battery use: https://www.openhardware.io/view/4/EasyNewbie-PCB-for-MySensors
    https://www.openhardware.io/uploads/568ed84b60aa3f8965fbf095/image/3.jpg
    All components in the image is needed (except battery measurment).
    If you dont want to use booster you need to bypass that one with a wire/jumper (or set the jumper on REG instead of BAT but that kills the logic).

    The battery doesnt "need" the 0,1uF but see here:https://www.mysensors.org/build/battery
    "The tap point could be bypassed with a 0.1 uF capacitor to keep the noise level low, at this otherwise high impedance point. "

    Hi. I've been using this board with 5V power from cell chargers and it works great. I'm trying to make my first battery sensor and am a bit confused (again) as to what is necessary. I'm powering using 2 AA batteries. I've cut the right side off the board so I'm obviously not using the measuring portion, but the above bit about the booster leaves me confused. Can someone answer:

    • I connect via the PWR and GND pads right?
    • Do I jumper BAT or REG?
    • Do I need to do anything else to get this to work?

    I tried to program using battery in but was using the ground from the ftdi connector. I could not get this to work. I'm thinking that this was a major problem and that I should have used the battery ground. That's the right approach right?

    OpenHardware.io mysensors battery easy newbie pcb mysx

  • Codebender motion sketch compile error
    C chuckconnors

    @hek said:

    That's strange... did you clone the sketch together with library? Are you having some old MySensors version in your account?

    To be honest, I have no idea. I was trying to run it directly from the sensor information page from the build link. I do have an account, but I have no idea if I have an old version. I guess I'll have to investigate my account and see if I can update/uninstall the old version.

    General Discussion

  • Codebender motion sketch compile error
    C chuckconnors

    I'm trying to use codebender to upload the default motion sensor node to my Arduino and am getting this compile error:

    In file included from (library file) MySensor/MyGateway.cpp:12:
    (library file) MySensor/MyGateway.h:39:28: error: use of undeclared identifier 'DEFAULT_CE_PIN'
    
                    MyGateway(uint8_t _cepin=DEFAULT_CE_PIN, uint8_t _cspin=DEFAULT_CS_PIN, uint8_t _inclusion_time = 1, uint8_t _inclusion_pin = 3, uint8_t _rx=6, uint8_t _tx=5, uint8_t _er=4);
                                             ^
    
    

    Can someone tell me how to get around this?

    General Discussion
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular