You can check the input from a sensor on a Maestro’s input channel using the
GET_POSITION command. Our PIR sensor should send a low signal when it detects motion, so
GET_POSITION should return a 0 when it detects and 1023 otherwise. To the Maestro, this works the same way as a button.
How you add the sensor to your sketch and where you should put it depends on what behavior you want. It is not clear to me how you want your code to behave after it senses someone (e.g. continue looping forever, run through your script once and check the sensor again, run for a certain amount of time), but if you just want your script to wait until the PIR sensor detects something before starting, you can add a
WHILE loop like this to the start of your current script:
11 get_position 500 greater_than while
If you try adding this and run into problems, can you post your complete script along with a description of what it is doing and what you want it to do?