AboudaKing
Member level 1
Im working on small project using PIC16f877 with 2 PIR sensor
The purpose of my project is automatic stairs light
My project and code works fine except one part that i could not figure it out
Well one PIR sensor in buttom staire nd other one on top when you going up the light start lighting up the way stairs by staire with 100ms delay in between
That works good both ways up/down
But if smone going up and other one going down it lights only in one way 'first one who passed'
Basicly once the PIC start the sensor loop
(PIR_1 LIGHTS WAY UP - PIR_2 LIGHTS WAY DOWN )
it cant start the 2nd loop untill first one complets all lights on then all off' only then it starts reading from sensors again
By that the code is not functioning well .
any solution so the PIC excute both loops incase both sensors were activated knowing that i have already tried free RTOS and didnt work for me
Thank you
The purpose of my project is automatic stairs light
My project and code works fine except one part that i could not figure it out
Well one PIR sensor in buttom staire nd other one on top when you going up the light start lighting up the way stairs by staire with 100ms delay in between
That works good both ways up/down
But if smone going up and other one going down it lights only in one way 'first one who passed'
Basicly once the PIC start the sensor loop
(PIR_1 LIGHTS WAY UP - PIR_2 LIGHTS WAY DOWN )
it cant start the 2nd loop untill first one complets all lights on then all off' only then it starts reading from sensors again
By that the code is not functioning well .
any solution so the PIC excute both loops incase both sensors were activated knowing that i have already tried free RTOS and didnt work for me
Thank you