Cara Membuat Sistem Buka-Tutup Pintu Otomatis Non-Sentuh
Komponen dan persediaan
| | × | 1 | |
| | × | 1 | |
| Modul Termometri Inframerah IR GY-906-BCC | | × | 1 | |
| Servo MG90S Two Tower Pro | | × | 1 | |
| | × | 1 | |
| HC-SR501 Sensor inframerah manusia | | × | 1 | |
Tentang proyek ini
Tujuan dari proyek ini adalah untuk membuka pintu secara otomatis dengan mendeteksi suhu tubuh. Sebenarnya, proyek ini untuk mencegah pasien dengan pneumonia koroner baru masuk ke rumah mereka. Sampai batas tertentu, menjamin keamanan lingkungan hidup.
Bagian berikut digunakan dalam proyek ini:
Arduino UNO, https://amzn.to/3ihYFBl
LCD I2C 2004, https://amzn.to/3gTMZnW
Modul Termometri Inframerah IR GY-906-BCC
Dua Menara Pro MG90S Servo
Buzzer, https://amzn.to/2BeYzu3
HC-SR501 Sensor inframerah manusia, https://amzn.to/3aJAOHX
Kode:https://github.com/DKARDU/AutomaticDoor
Terima kasih telah menonton, Tetap di rumah dan Aman... Semoga harimu menyenangkan! #Arduino #Arduinoproject #Covid-19
Kode
autodoor.inoArduino
#include #include #include #include Adafruit_MLX90614 mlx =Adafruit_MLX90614();LiquidCrystal_I2C lcd(0x27,20,4);; Servo myservo2; #define red 13#define haha 4int pos1,pos2;void setup() { Serial.begin(9600); pinMode(merah, KELUARAN); pinMode(haha,INPUT); myservo1.attach(7); myservo2.attach(8); myservo1.write(90); myservo2.write(90); mlx.mulai(); lcd.init(); lcd.lampu latar(); }void loop() { int montion =digitalRead(haha); if(montion ==1){ Serial.print("dibuat"); Serial.print("\n"); lcd.setCursor(0,0); lcd.print("Suhu Objek:"); lcd.setCursor(13,3); lcd.print("-DKARDU"); kaiguan(); } } void kaiguan(){ int temp_obj =mlx.readObjectTempC(); Serial.print(temp_obj); Serial.print("\n"); if(temp_obj <31){ lcd.setCursor(0,1); lcd.print(temp_obj); lcd.setCursor(0,2); lcd.print("Tidak terdeteksi, tes ulang!"); }if(temp_obj> 30 &&temp_obj <38){ lcd.setCursor(0,1); lcd.print(temp_obj); lcd.setCursor(0,2); lcd.print("suhu tubuh oke"); untuk(pos1 =90; pos1 <=180; pos1 +=1) { myservo1.write(pos1); myservo2.write(180-pos1); penundaan (15); } penundaan(5000); untuk(pos1 =180; pos1>=90; pos1 -=1) { myservo1.write(pos1); myservo2.write(180-pos1); penundaan (15); } } if(temp_obj>37){ digitalWrite(merah,TINGGI); lcd.setCursor(0,1); lcd.print(temp_obj); lcd.setCursor(0,2); lcd.print("Jauhkan! "); penundaan (500); } digitalWrite(red,LOW);}
Skema