Arduino code to log data from sensors