sensor reading and logging