https://www.learnsteps.com/controlling-led-with-motion-sensors-in-raspberry-pi-using-python/
Controlling LED with Motion Sensors in Raspberry Pi using python.