Skip to content

Instantly share code, notes, and snippets.

@HackMEAny
HackMEAny / Drunk_Driver_Detector.ino
Created January 27, 2021 14:50
Drunk Driver Detector using Arduino & MQ3 Gas Sensor
//#include <LiquidCrystal.h> For using 12x2 lcd array
//LiquidCrystal lcd(12,11,6,5,4,3,2);
const int AOUTpin=0;//the AOUT pin of the alcohol sensor goes into analog pin A0 of the arduino
const int DOUTpin=8;//the DOUT pin of the alcohol sensor goes into digital pin D8 of the arduino
const int ledPin=13;//the anode of the LED connects to digital pin D13 of the arduino
const int motorPin=7;
int limit;
int value;
// Arduino UNO Basic Line Following Robot Code
// Code hosted on https://github.com/Mcspanky93/Line-Follower-Calibration-Buzzer
int sensor1 = A0; //connected to analog 0
int sensor2= A1; // connected to analog 1
int sensor3= A2; // connected to analog 2
int sensor4= A3; // connected to analog 3
int sensorMin1 = 1023; // minimum sensor value
int sensorMin2 = 1023;
int sensorMin3 = 1023;