Inspire Award Project | Smart Helmet Alcohol Detection for Drivers | Best science Project | Harish Projects
- Get link
- X
- Other Apps
Watch Making video....
//Arduino Code//
#define sensorDigital A0
#define Motor 9
#define buzzer 8
#define sensorAnalog A1
void setup() {
pinMode(sensorDigital, INPUT);
pinMode(Motor, OUTPUT);
pinMode(buzzer, OUTPUT);
Serial.begin(9600);
}
void loop() {
bool digital = digitalRead(sensorDigital);
int analog = analogRead(sensorAnalog);
Serial.print("Analog value : ");
Serial.print(analog);
Serial.print("t");
Serial.print("Digital value :");
Serial.println(digital);
if (digital == 0) {
digitalWrite(Motor, HIGH);
digitalWrite(buzzer, HIGH);
} else {
digitalWrite(Motor, LOW);
digitalWrite(buzzer, LOW);
}
}
// Diagram 1....//
// Diagram 2...//
Contact us for support.
instagram - https://www.instagram.com/harishchoudhary70/
- Get link
- X
- Other Apps
Comments