#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2);
int PIRpin = 8;
void setup()
{
lcd.begin();
pinMode(PIRpin,INPUT);
lcd.home();
lcd.print("Waiting for PIR");
delay(10000);
lcd.clear();
}
void loop()
{
int x = digitalRead(PIRpin);
lcd.home();
lcd.print("PIR = ");
lcd.print(x);
delay(100);
}
LiquidCrystal_I2C lcd(0x27,16,2);
int PIRpin = 8;
void setup()
{
lcd.begin();
pinMode(PIRpin,INPUT);
lcd.home();
lcd.print("Waiting for PIR");
delay(10000);
lcd.clear();
}
void loop()
{
int x = digitalRead(PIRpin);
lcd.home();
lcd.print("PIR = ");
lcd.print(x);
delay(100);
}
ความคิดเห็น