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. By uploading the DHT 22 sketch, I get an error each time.

By uploading the DHT 22 sketch, I get an error each time.

Scheduled Pinned Locked Moved Development
6 Posts 4 Posters 2.0k Views 4 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.
  • D Offline
    D Offline
    dinand
    wrote on last edited by
    #1

    Hello all,

    I am new to MySensors and am a Dutchman, so sorry for my english. I've been busy for a while to a Serial Gateway (NRF24L01 + 2.4GHz Wireless Transceiver) to be established between my Raspberry Pi-3B + Domoticz and DHT 22 sensor.The upload off the Serial Gateway is fine, but I get by uploading off the DHT 22 sketch an error each time.
    The sketches that I use:
    For Serial Gateway:
    https://github.com/mysensors/MySensors/blob/master/examples/GatewaySerial/GatewaySerial.ino
    For the DhtTemperatureAndHumiditySensor:
    https://github.com/mysensors/MySensorsArduinoExamples/blob/master/examples/DhtTemperatureAndHumiditySensor/DhtTemperatureAndHumiditySensor.ino
    The error is in the DhtTemperatureAndHumiditySensor sketch:
    Arduino: 1.8.1 (Linux) Board: "Arduino / Genuino Uno"

    /tmp/arduino_modified_sketch_307117/sketch_mar09a.ino: In function 'void loop()':
    sketch_mar09a:105: error: no matching function for call to 'DHT::readSensor(bool)'
    dht.readSensor(true);
    ^
    /tmp/arduino_modified_sketch_307117/sketch_mar09a.ino:105:22: note: candidate is:
    In file included from /tmp/arduino_modified_sketch_307117/sketch_mar09a.ino:45:0:
    /home/dinand/Arduino/libraries/DHT/DHT.h:83:8: note: void DHT::readSensor()
    void readSensor();
    ^
    /home/dinand/Arduino/libraries/DHT/DHT.h:83:8: note: candidate expects 0 arguments, 1 provided
    exit status 1
    no matching function for call to 'DHT::readSensor(bool)'

    Could someone give me advice how can I solve this?

    We thank you for thinking.

    Dinand

    mfalkviddM 1 Reply Last reply
    0
    • D dinand

      Hello all,

      I am new to MySensors and am a Dutchman, so sorry for my english. I've been busy for a while to a Serial Gateway (NRF24L01 + 2.4GHz Wireless Transceiver) to be established between my Raspberry Pi-3B + Domoticz and DHT 22 sensor.The upload off the Serial Gateway is fine, but I get by uploading off the DHT 22 sketch an error each time.
      The sketches that I use:
      For Serial Gateway:
      https://github.com/mysensors/MySensors/blob/master/examples/GatewaySerial/GatewaySerial.ino
      For the DhtTemperatureAndHumiditySensor:
      https://github.com/mysensors/MySensorsArduinoExamples/blob/master/examples/DhtTemperatureAndHumiditySensor/DhtTemperatureAndHumiditySensor.ino
      The error is in the DhtTemperatureAndHumiditySensor sketch:
      Arduino: 1.8.1 (Linux) Board: "Arduino / Genuino Uno"

      /tmp/arduino_modified_sketch_307117/sketch_mar09a.ino: In function 'void loop()':
      sketch_mar09a:105: error: no matching function for call to 'DHT::readSensor(bool)'
      dht.readSensor(true);
      ^
      /tmp/arduino_modified_sketch_307117/sketch_mar09a.ino:105:22: note: candidate is:
      In file included from /tmp/arduino_modified_sketch_307117/sketch_mar09a.ino:45:0:
      /home/dinand/Arduino/libraries/DHT/DHT.h:83:8: note: void DHT::readSensor()
      void readSensor();
      ^
      /home/dinand/Arduino/libraries/DHT/DHT.h:83:8: note: candidate expects 0 arguments, 1 provided
      exit status 1
      no matching function for call to 'DHT::readSensor(bool)'

      Could someone give me advice how can I solve this?

      We thank you for thinking.

      Dinand

      mfalkviddM Offline
      mfalkviddM Offline
      mfalkvidd
      Mod
      wrote on last edited by
      #2

      @dinand welcome to the MySensors community.

      The dht library must be installed. See instructions on https://www.mysensors.org/build/humidity

      1 Reply Last reply
      0
      • BrydenB Offline
        BrydenB Offline
        Bryden
        wrote on last edited by
        #3

        This seems to be a common issue, maybe a change to highlight that the exact listed DHT library mentioned needs to be installed and no other lol

        1 Reply Last reply
        0
        • alowhumA Offline
          alowhumA Offline
          alowhum
          Plugin Developer
          wrote on last edited by
          #4

          Too many sketches on the website have issues.

          mfalkviddM 1 Reply Last reply
          0
          • alowhumA alowhum

            Too many sketches on the website have issues.

            mfalkviddM Offline
            mfalkviddM Offline
            mfalkvidd
            Mod
            wrote on last edited by
            #5

            @alowhum could you be a bit more specific? Sketches are tested automatically but automatic tests do not cover everything so we rely on eachother to spot and correct if there are problems that the automatic tests don't catch.

            1 Reply Last reply
            0
            • BrydenB Offline
              BrydenB Offline
              Bryden
              wrote on last edited by
              #6

              @alowhum They seem to be not quite as easy for copy paste programming. I have had to do a heap of reading and learning to get it all down.

              Any the other one is you search the forums for soloutions before posting and half the solutions are pre 2.x and dont work either, I don't like noob posting basic stuff due to my lack of programming skill, but people here seem quite nice and willing to help :)

              Wait for my debouncing post later tonight if I cant work it out hahaha

              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