added a sketch to try out the datalogging method