Stap 2: Code
Kopieer en plak de onderstaande code in uw Arduino IDE#include
ezLCD3 lcd;
int pirPin = 3;
VOID Setup
{
LCD.begin (EZM_BAUD_RATE);
LCD.CLS();
LCD.Picture(40,0,"EMH.gif");
LCD.Picture(0,45,"ArdHeart.gif");
LCD.Picture(110,135,"arLogo.gif");
pinMode (pirPin, INPUT);
}
void loop
{
if(digitalRead(pirPin) == HIGH)
{
LCD.Light(100);
}
if(digitalRead(pirPin) == laag)
{
LCD.Light(5);
}
}