MQ-3 Alcohol Gas Sensor Nick Hardeman | Bruce Drummond | Katherine Lee
MQ-3 Alcohol Gas SensorNick Hardeman | Bruce Drummond | Katherine Lee
QuickTime™ and a decompressor
are needed to see this picture.
A
B
The guts
The code// Alcohol Sensor// LED blink rate controlled by analog input from an alcohol sensor on pin 0
int alcVal = 0;int alcSensorPin = 0;int ledPin = 13;
void setup() { Serial.begin(9600); pinMode(ledPin, OUTPUT);}
void loop() { alcVal = analogRead(alcSensorPin); Serial.println(alcVal); digitalWrite(ledPin, HIGH); delay(alcVal); digitalWrite(ledPin, LOW); delay(alcVal);}
User testing