Rushdiey
Junior Member level 2
- Joined
- Jan 10, 2013
- Messages
- 24
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,419
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