Added ESP32, ESP8266 compatibility

This commit is contained in:
Dhruba Saha
2023-09-20 06:45:14 +05:30
parent 833a45c6ab
commit e69a910c92
4 changed files with 26 additions and 4 deletions

View File

@@ -11,7 +11,10 @@
// Include the DHT11 library for interfacing with the sensor.
#include <DHT11.h>
// Create an instance of the DHT11 class. The sensor is connected to digital I/O pin 2.
// Create an instance of the DHT11 class.
// - For Arduino: Connect the sensor to Digital I/O Pin 2.
// - For ESP32: Connect the sensor to pin GPIO2 or P2.
// - For ESP8266: Connect the sensor to GPIO2 or D4.
DHT11 dht11(2);
void setup()