Read sensor in each loop