#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
const int gasPin = 26;
void setup() {
Serial.begin(9600);
lcd.init();
lcd.backlight();
lcd.setCursor(0, 0);
lcd.print("Gas Sensor Test");
delay(2000);
}
void loop() {
int gasValue = analogRead(gasPin);
Serial.print("Gas Value: ");
Serial.println(gasValue);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Gas Value: ");
lcd.print(gasValue);
delay(1000);
}
Loading
ds18b20
ds18b20