Rushdiey
Junior Member level 2
How to make c programming coding.. when ldr goes dark it will count something.
I hope someone can share it
this is my example. but not work
I hope someone can share it
#include <reg51.h>
#include <stdio.h>
sbit LDR=P0^7;
long int count;
long int i;
void main()
{
while(1)
{
if(LDR==1)
count++;
else
{
count--;
}
}
}
this is my example. but not work