How to read data from sensors