Hi Arduino community. Firstly, I am a super noob, please don't get to irritated with my stupid questions. The project I want to complete is a bedroom light switch, which utilizes a momentary switch and a pir sensor. The idea is when the switch/button is pressed, and the pir detects motion, that the light is switched on. If after a predetermined time period has passed with no movement detected, that the light switches off automatically. However I would also like the option that if I want to turn off the light manually, that I can do that by pressing the button again. As you may have guessed I have at least one offspring. But the other use I would have for this project is for some of the tools I use at my workbench, like soldering iron, glue gun and maybe even the air compressor. tools that I am very paranoid about leaving on.
I did get as far as writing a sketch using if and and statements but soon found at least as far as I could see that would not work. Could someone steer me in the right direction please?