10% Off For Your First Order, Code:Elephant10



Arduino Project: Steam Sensor

Posted by Fiona Su on

thumb
Introduction:
When there is drop or steam adhered to sensing point of water or steam sensor, MCU will get a feedback of analog signal from S signal pin of the sensor. You can read out the value from MCU to deduce whether it rains..
Hardware required:

  • Arduino Board *1
  • USB Cable*1
  • I2C 1602 LCD *1
  • Steam Sensor*1
  • Breadboard *1
  • Breadboard Jumper Wires
  • Male to Female Dupont Lines

Connection Diagram:
Connection for REV4:

thumb
Connection for 2560 R3:

thumb
Sample program:

#include <Wire.h> 
    #include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2);
void setup() {
    lcd.init();                      // initialize the lcd 
    lcd.init();
    // Print a message to the LCD.
    lcd.backlight();
    lcd.setCursor(1,0);
    lcd.print("SensorValue :  ");
}

// the loop routine runs over and over again forever:
void loop() {
  // read the input on analog pin 0:
  int sensorValue = analogRead(A0);
  // print out the value you read:
      lcd.setCursor(3,1);
      lcd.print(sensorValue);
  delay(1);        // delay in between reads for stability
}

Result:
After connection and uploading sample code, we can see analog value which means current vapor content on LCD with power-on.

0 comments

Leave a comment

Please note, comments must be approved before they are published