Aug 27, 2015 #1 H hirenn Full Member level 1 Joined Jul 12, 2014 Messages 96 Helped 0 Reputation 0 Reaction score 0 Trophy points 6 Activity points 703 Hi i have connected two switches with P1.0 and P1.1 and led at p1.2 swtches are spst , led is 5mm red my logic is like if sw1 and sw2 are not pressed then led off if sw1 is pressed on led for 10 seconds, and check for sw2 after 10 seconds if sw1 not pressed led off if sw2 is pressed led continuous on if sw2 not pressed then off led and check for sw1 idk how to do this anyone please help me thanks
Hi i have connected two switches with P1.0 and P1.1 and led at p1.2 swtches are spst , led is 5mm red my logic is like if sw1 and sw2 are not pressed then led off if sw1 is pressed on led for 10 seconds, and check for sw2 after 10 seconds if sw1 not pressed led off if sw2 is pressed led continuous on if sw2 not pressed then off led and check for sw1 idk how to do this anyone please help me thanks
Aug 27, 2015 #2 F FenTrac Full Member level 5 Joined Jul 6, 2014 Messages 248 Helped 50 Reputation 102 Reaction score 54 Trophy points 1,308 Location West Coast Activity points 4,226 Here is a sample program in c to look at. View attachment 8051_hlp.txt