proximity sensor code and controls work