IOT 24
Mon Jan 08 2024 19:29:56 GMT+0000 (Coordinated Universal Time)
Saved by
@马丽
#include <WiFi.h>
#include "Adafruit_MQTT.h"
#include "Adafruit_MQTT_Client.h"
#include "AdafruitIO_WiFi.h"
#include "DHT.h"
#define WLAN_SSID "X"
#define WLAN_PASS "asdfghjk"
#define AIO_SERVER "io.adafruit.com"
#define AIO_SERVERPORT 1883
#define AIO_USERNAME "chathurazju"
#define AIO_KEY "aio_fTGR25ihhqnx65rtc2aTOdaL8ODV"
#define DHTPIN 4 // Pin where the DHT11 is connected
#define DHTTYPE DHT11 // Type of DHT sensor (DHT11 or DHT22)
#define RED_LED_PIN 5 // Pin number for the red LED
#define GREEN_LED_PIN 13 // Pin number for the green LED
content_copyCOPY
Comments