Justice Tinashe
Newbie level 1
I want to design a system that when it senses motion the lights will be automatically switched on and then off when no motion is detected. can I use PIC 16F877A and how? Thank you
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
void main()
{
TRISB=0x0f;
PORTB=0;
while(1)
{
if(RB0_bit)
{
if(RB1_bit)
{
PORTB=48;
Delay_ms(300);
PORTB=0;
Delay_ms(100);
}
else
PORTB=0;
} }