frame

Examples for NODEMCU V2 + DHT22/HTS221

Hello everyone,

I am starting to learn ZERYNTH STUDIO.

I connected the board NODEMCU V2 and verified the sample programs as BLINK. All right.

At this point I would like to connect the DHT22 or HTS221 sensor and read the temperature / humidity on the terminal or 20x4 LCD.

Unfortunately the sample program loaded me an error (see listing).

Unfortunately I can not understand how I can fix the code for the board NODEMCU V2.

Someone in the Forum could direct me to a NODEMCU V2 program connected to a DHT22. I also find a HTS221 sensor for my project.

Thank you

Luciano
DHT22.JPG 119.5K

Comments

  • floydfloyd Member
    hi @lucio1960 ;
    here you can find more info about the pin mapping and function naming in Zerynth https://doc.zerynth.com/core.zerynth.stdlib/r1.0.8/pin_mapping.html ;

    in your particular case you are trying to access a feature ICU (Input Capture Unit) that isn't available on pin D3 of the NODEMCU V2. ICU is required by the DHT22 sensor lib for reading the sensor incoming data.

    Unfortunately the ESP8266 doesn't support ICU thus, the DHT22 driver can't work on this board.

    more info here on the feature available on the ESP8266 NODEMCU V2 board here http://doc.zerynth.com/board.zerynth.nodemcu2/r1.0.13/

    In future we could release an emulated version of the ICU driver for the ESP8266 based on interrupts that will enable this feature also on the NODEMCU V2.

    We'll keep you posted
    Daniele Mazzei
    Zerynth Chief System Architect
  • Hello Daniele,

    this is a big limit that should be fixed ASAP because the DHT22 sensor is the absolute King of the makers who want to make a project with a temperature and humidity sensors.

    In the past I have not had problems with some applications NODEMCU V2 and DHT22 both ARDUINO IDE with MBED ARM.

    ZERYNTH 2.0.1 should definitely fill that gap :)
  • floydfloyd Member
    hello @lucio1960 ;
    i am afraid, this isn't a limit of Zerynth but of the ESP8266 hardware  >:)
    The driver for the DHT22 has been developed using ICU, one of the latest and most powerful feature of the new MCU families that unfortunately isn't supported by the ESP8266. 

    In Arduino and MBED you probably used an interrupts based driver for the DHT22 that works fine for most of the cases but is very far from the state of the art of pro embedded technology.

    btw, we'll do our best to workaround this :)

    ...I am waiting for the ESP32... 
    Daniele Mazzei
    Zerynth Chief System Architect
  • Thank you very much Daniele, then I await good news

    Luciano
Sign In or Register to comment.

ZERYNTH Community

@ 2016 Zerynth.com, all rights reserved.