Motion sensors for porch light? (2019)

It’s a ipad Copy and pasting code into the IDE