You are reading a single comment by @petrynchyn and its replies. Click here to read the full conversation.
  • After the firmware 1q84.tvemasterf35ac96 this code started working with failures, problem only with DHT module.
    In firmware 1v84.tvemaster363580f everything worked well.
    ESP-12q

    var dht = require("DHT22").connect(D4);
    
    var ds18 = require("DS18B20").connect(new OneWire(D5));
    
    I2C1.setup({sda:D12, scl:D14});
    var tsl = require('TSL2561').connect(I2C1);
    tsl.init(tsl.config.address.FLOAT,
             tsl.config.timing._402MS,
             tsl.config.gain._1X);
    
    var a = setInterval(function (){
      dht.read(function (a) { console.log("Temp is      ",a.temp,"  °C and RH is ",a.rh,"%");});
    
      ds18.getTemp(function (temp) { console.log("Temp is      ",temp,"°C");}, true);
    
      tsl.getLuminosity( tsl.config.spectrum.VISIBLE, 
           function (x) { print ("Luminosity is",x,"Lux"); }  
      );
    }, 3000);
    

    terminal window:

     _____                 _
    |   __|___ ___ ___ _ _|_|___ ___
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
              |_| http://espruino.com
     1v84.tve_master_f35ac96 Copyright 2016 G.Williams
    WARNING: the esp8266 port is in beta!
    Flash map 4MB:512/512, manuf 0xe0 chip 0x4016
    >echo(0);
    =undefined
    Temp is       20.1   °C and RH is  18.4 %
    Temp is       20.875 °C
    Luminosity is 22 Lux
    Temp is       20.1   °C and RH is  18.3 %
    Temp is       20.875 °C
    Luminosity is 22 Lux
    Temp is       20.2   °C and RH is  18.3 %
    Temp is       20.875 °C
    Luminosity is 22 Lux
    Temp is       20.2   °C and RH is  18.2 %
    Temp is       20.875 °C
    Luminosity is 22 Lux
    Temp is       20.875 °C
    Luminosity is 22 Lux
    Temp is       -1   °C and RH is  -1 %
    Temp is       20.875 °C
    Luminosity is 22 Lux
    Temp is       -1   °C and RH is  -1 %
    Temp is       20.875 °C
    Luminosity is 22 Lux
    Temp is       -1   °C and RH is  -1 %
    Temp is       20.875 °C
    Luminosity is 22 Lux
    Temp is       -1   °C and RH is  -1 %
    Temp is       20.875 °C
    Luminosity is 22 Lux
    Temp is       -1   °C and RH is  -1 %
    Temp is       20.875 °C
    Luminosity is 22 Lux
    Temp is       -1   °C and RH is  -1 %
    Temp is       20.2   °C and RH is  18.2 %
    Temp is       20.875 °C
    Luminosity is 22 Lux
    Temp is       20.2   °C and RH is  18.3 %
    Temp is       20.875 °C
    Luminosity is 22 Lux
    
About

Avatar for petrynchyn @petrynchyn started