GPIO3 is the RX-input but if you don't use serial-input, this pin can be used without problems.
something like this:
Explore... Chat... Share...
Moderator: Mmiscool
#include <DHT.h> // adafruit library
DHT dht(5, DHT21); // 5 is GPIO5, DHT21 you may want change at DHT11 or DHT22
dht.begin(); // in setup()
if ( Param0 == F("dtemp"))
{
SetMeThatVar(Param1, String(dht.readTemperature())); // if you want temperature in celcius scale
// SetMeThatVar(Param1, String(dht.readTemperature(true))); // if you want temperature in fahrenheit scale
return;
}
if ( Param0 == F("dhum"))
{
SetMeThatVar(Param1, String(dht.readHumidity()));
return;
}
if ( Param0 == F("dheatindex"))
{
SetMeThatVar(Param1, String(dht.computeHeatIndex(t, h, false))); // if you want heat index in celcius scale
// SetMeThatVar(Param1, String(dht.computeHeatIndex(t, h))); // if you want heat index in fahrenheit scale
return;
}
if ( Param0 == "temp" | Param0 == "ti")
It takes about 20-25 seconds for home assistant c[…]
I tried to upgrade tof my sonoff basic R2 with the[…]
a problem Perhaps you want to define "Probl[…]
Rebooting your router will not give you a faster I[…]
There are no other notifications from esptool.py i[…]
Using the Arduino IDE, you'll learn how to set up […]
In this project, you will post to Twitter using an[…]
In this project, we will build a water level contr[…]
I guess I'm late, but I had the same problem and f[…]
Last night I received my first D1 Minis for a lear[…]
Although I am aware that this is an old post, I fe[…]