Sketch for sleep monitor: data logger post