#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
const int pir=2;
int gas=A0;
void setup() {
lcd.init();
lcd.backlight();
pinMode(pir, INPUT);
}
void loop() {
int cantidad=analogRead(gas);
int movimiento=digitalRead(pir);
lcd.clear();
lcd.setCursor(4,0);
lcd.print(cantidad);
lcd.setCursor(8,1);
lcd.print(movimiento);
delay(300);
}
//https://wokwi.com/projects/439645594626462721Gas
I2C