My code for sensors