I have a Xiao with add relay module and 2, 5V fans used to cool an enclosure. I flashed the Seed with 2 usermods: multirelay and LDR_Dusk_Down. I also want to use a PIR sensor (HC-SR501).
I have 2 presets: 1st do some solid colors when is dark and run the 2 fans and 2nd with all off when is light.
I want to add a PIR sensor to have a 3rd preset to change when PIR is activated and come back to previous state when is dark.
How can I do that?
Connect the PIR like a switch or PIR?
3rd preset call API to activate the other 2?
Thank you