Hello every one my deliverable is after tomorrow and i'm new to arduino i did my best but i need to make sure if it is right or not .
the circut is down below.
the code is :
#include<LiquidCrystal.h>
LiquidCrystal lcd(0,1,2,3,4,5);
int ldr1=9;
int ldr2=10;
int person=0;
int count=0;
float count1;
int sensorValue=0;
void setup() {
lcd.begin(16,2);
lcd.clear();
lcd.setCursor(0,0);
pinMode(ldr1,INPUT);
pinMode(ldr2,INPUT);
pinMode(sensorValue,INPUT);
Serial.begin(9600);
}
void loop() {
if(digitalRead(ldr1)==HIGH&&digitalRead(ldr2)==LOW)
{
delay(100);
if(digitalRead(ldr1)==LOW&&digitalRead(ldr2)==HIGH)
{person+=1;
}
}
if(digitalRead(ldr2)==HIGH&&digitalRead(ldr1)==LOW)
{
delay(100);
if(digitalRead(ldr2)==LOW&&digitalRead(ldr1)==HIGH);
}
}
if(ldr1==LOW&Ldr2==LOW);
{
print();
}
void print1()
{
lcd.setcursor(0,0);
lcd.print("person:");
lcd.print(person);
}
thankyou
