Alc Sensor

979 views
903 views

Published on

Published in: Health & Medicine, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
979
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
17
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Alc Sensor

  1. 1. MQ-3 Alcohol Gas Sensor Nick Hardeman | Bruce Drummond | Katherine Lee
  2. 2. A B
  3. 3. The guts
  4. 4. The code <ul><li>// Alcohol Sensor </li></ul><ul><li>// LED blink rate controlled by analog input from an alcohol sensor on pin 0 </li></ul><ul><li>int alcVal = 0; </li></ul><ul><li>int alcSensorPin = 0; </li></ul><ul><li>int ledPin = 13; </li></ul><ul><li>void setup() { </li></ul><ul><li>Serial.begin(9600); </li></ul><ul><li>pinMode(ledPin, OUTPUT); </li></ul><ul><li>} </li></ul><ul><li>void loop() { </li></ul><ul><li>alcVal = analogRead(alcSensorPin); </li></ul><ul><li>Serial.println(alcVal); </li></ul><ul><li>digitalWrite(ledPin, HIGH); </li></ul><ul><li>delay(alcVal); </li></ul><ul><li>digitalWrite(ledPin, LOW); </li></ul><ul><li>delay(alcVal); </li></ul><ul><li>} </li></ul>
  5. 5. User testing

×