how to use pis automatic sensor