delay

Discussion about projects that used PIC Microcontroller, Hardware Interface, Programming Algorithm and etc......

Re: delay

Postby robosang » Thu Nov 15, 2012 9:13 am

Try verify your program using push button, is the photo diode digital? If it is analog, use a potentiometer/variable resistor to replace it. Play around with the potentiometer and push button with your program, if the program does not response correctly, you need to debug the program, reduce the complexity of program until it works. Only after that, add more code and verify again.
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Re: delay

Postby Alen.ATLow » Fri Nov 16, 2012 11:01 am

According to your code,

LED2 is always ON unless PIR sensor is triggered when Light is OFF
LED will be only on then PIR sensor is triggered when the light is OFF

If this is not the sequence that you want, better check your coding logic.
Alen.ATLow
Novice
 
Posts: 17
Joined: Mon Nov 12, 2012 12:53 pm

Previous

Return to PIC Microcontroller

Who is online

Users browsing this forum: No registered users and 1 guest

cron