งาน arduino 2 gas sensor

gas sensor
Alcohol Sensor เป็นเซนเซอร์วัดระยะที่ใช้วัดปริมาณของ Alcohol มี Output ให้เลือกใช้งาน ทั้งแบบ Analog และ Digital โดย Output ของแบบ Digital สามารถกำหนดช่วงการทำงานได้โดยปรับค่าที่ Potentiometer
 การต่อวงจร
Arduino Alcohosensor
5VVCC 
GNDGND 
pin A0A0 
 
โค้ดตัวอย่างการใช้งาน
int mq3_analogPin = A0; // connected to the output pin of MQ3 
void setup()
{
Serial.begin(9600); // open serial at 9600 bps
}
void loop()
{
  // give ample warmup time for readings to stabilize
  int mq3_value = analogRead(mq3_analogPin);
  Serial.println(mq3_value);
  delay(100); //Just here to slow down the output.
}

ความคิดเห็น

โพสต์ยอดนิยมจากบล็อกนี้

งาน FLOWCHART

งาน arduino 5 photo transistor

งาน arduino 7 Voltage Sensor