Home
About Us
Achievement
Home
Raspberry-Pi Projects
_Raspberry Pi 4 Complete Guide
Arduino Project
_All Projects
Esp8266 Project
_All Projects
Esp32 Project
_Automation-with-feedback
Arduino Alcohol Detector
Just Do Electronics
February 02, 2020
Arduino Alcohol Detector
Circuit Diagram :-
Code :-
//prateek singh //www.prateeks.in #include
LiquidCrystal lcd(2,3,4,5,6,7); #define sensor 9 #define led 13 #define buz 8 void setup() { Serial.begin(9600); lcd.begin(16,2); lcd.print("Alcohol Detector"); lcd.setCursor(0,1); lcd.print("www.prateeks.in"); delay(2000); pinMode(sensor, INPUT); pinMode(buz, OUTPUT); pinMode(led, OUTPUT); lcd.clear(); } void loop() { float adcValue=0; for(int i=0;i<10;i++) { adcValue+= analogRead(sensor); delay(10); } float v= (adcValue/10) * (5.0/1024.0); float mgL= 0.67 * v; Serial.print("BAC:"); Serial.print(mgL); Serial.print(" mg/L"); lcd.setCursor(0,0); lcd.print("BAC: "); lcd.print(mgL,4); lcd.print(" mg/L "); lcd.setCursor(0,1); if(mgL > 0.3) { lcd.print("Drunk "); Serial.println(" Drunk"); digitalWrite(buz, HIGH); digitalWrite(led, HIGH); } else { lcd.print("Normal "); Serial.println(" Normal"); digitalWrite(buz, LOW); digitalWrite(led, LOW); } delay(100); }
0 Comments
Newer
Older
ESP32 Interfacing With LDR Sensor
How To Make RFID & Keypad Based Door Lock
Ultrasonic Sensor as a Counter with Arduino
IoT Based Patient Health Monitoring System Using Blynk App
How to Make Gas Leak Detector & Auto Exhaust Fan Using Arduino
MLX90614 Non-Contact Infrared Thermometer With Arduino
Measure CO2 Level in Air Using Arduino
Esp32 Cam Based Face Unlock
ESP32 Led Blink With Push Button
Smart Street Light Using Arduino
YouTube
Like on Facebook
Follow on Twitter
Follow on Google+
Follow on Instagram
Subscribe on Youtube
Hi WelCome To My Website If you have a creative mind and want to learn Electronics even without studying it then FRIENDS this Website And Youtube Channel is for you, I am crazy creators who love making Electronics things. I have a bunch of more than 130 Tutorial Videos on My YouTube Channel and I upload a new Tutorial every Sunday.
Tags
Arduino Project
Esp32 Project
Esp8266 Project
0 Comments