I am going to create a robot that will turn on my light when I enter the room and will turn it off when I exit my room. The robot will turn the light on/off using a servo mounted near the light switch. The way I am thinking for the robot to know whether I enter/exit my room will be with using 2 PIR Motion sensors. Meaning one outside my door and one in my room near the door. For the program for these pir sensors I'm thinking I will have to use pulseIn() in order to see which PIR sensor went HIGH first, because the output pin goes high when it detects something. Is this correct?
Any help is great.