So, as an example, I am attempting to use the ESP8266 as a solitary controller for some motion based LED's I plan to install in my hallway. Unfortunately nobody has the capacity to turn off the lights down here, despite my efforts, and even having installed additional switches at every room/entrance (3 bedrooms, a bathroom, a laundry room, and the stairway, which has two switches) with access to the hallway, and still, the lights stay on...
Anyhow, my solution is to use an inexpensive controller to monitor 3 PIR motion sensors in the hall, when one is triggered it will kick over a relay to power on a few strips of LED's. Unfortunately, down to my issue, the code I have found to work from has:
outpin=3
gpio.mode(outpin,gpio.OUTPUT)
inpin=6
gpio.mode(inpin,gpio.INT,gpio.PULLUP)
function motion()
print("MOTION DETECTED")
gpio.write(outpin,gpio.HIGH)
tmr.delay(5000000)
gpio.write(outpin,gpio.LOW)
end
gpio.trig(6,"up",motion)
Unfortunately I do not know how the pin numbers correspond to the GPIO labels. If anybody can help me with this it would be GREATLY appreciated!
I apologize for the long post, I just really prefer to be detailed in my descriptions of my intentions, observations and issues so as to prevent any confusion... Hopefully I nailed it all, if not I will happily answer any relevant, necessary questions.
THANK YOU!!!