Alc Sensor

Post on 31-Aug-2014

1419 Views

Category:

Health & Medicine

4 Downloads

Preview:

Click to see full reader

DESCRIPTION

 

Transcript

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

top related