Mundarija:
2025 Muallif: John Day | [email protected]. Oxirgi o'zgartirilgan: 2025-01-13 06:58
Sensorli DHT11 va 3 potentsial o'lchagichlar uchun kayfiyat chiroqlari. 2 -usul: kambag'al rang -barang rang, kambiya va datchiklar, DHT11.
1 -qadam: Materiallar Y Herramientas
Materiallar:
1. Paletalar
2. Goma caliente
3. Papel delgado
4. 1 Arduino
5. 1 Protoboard
6. 1 Led RGB
7. 1 boton momentasi
9. 1 SPST -ga o'tish
10. 1 DHT11 sensori
11. 3 ta potentsiometros
12. Qattiq yadroli kabel (siz simli telfondan foydalanasiz)
Harramientas:
1. Tijeralar
2. Kuchilla
3. Pistola de goma caliente
2 -qadam: Armar El -Circuito
3 -qadam: dasturiy ta'minot
// Foydalaning:
#"DHT.h" ni qo'shing
#DHTPIN A3 ni aniqlang
#DHTTYPE DHT11 ni aniqlang
DHT dht (DHTPIN, DHTTYPE);
bo'sh o'rnatish () {
pinMode (3, OUTPUT);
pinMode (4, OUTPUT);
pinMode (5, OUTPUT);
pinMod (6, INPUT_PULLUP);
}
int rejimi = 0;
int h = 170;
int t = 15;
int delta = YUQORI;
void loop () {
if (delta if (mode == 0) rejimi = 1;
else rejimi = 0;
}
delta = digitalRead (6);
agar (rejim == 0) {
analogWrite (3, xarita (analogRead (A0), 0, 1023, 0, 127));
analogWrite (4, xarita (analogRead (A1), 0, 1023, 0, 127));
analogWrite (5, xarita (analogRead (A2), 0, 1023, 0, 127));
}
boshqa {
if (isnan emas (dht.readHumidity ())) h = dht.readHumidity ();
if (isnan (dht.readTemperature ())) t = dht.readTemperature () emas;
analogWrite (3, xarita (h, 150, 190, 0, 127));
analogWrite (5, xarita (t, 10, 20, 0, 127));
}
}
4 -qadam: Armar La Estructura va Agregar Detalles
Qachonki, bu sizning qo'lingizdan kelganini aytganda, bu sizning qo'lingiz bilan.