#!/usr/bin/perl

my $date = `date +%F`;
chomp($date);
$sleep = `/home/ender/bin/sleeptracker text /dev/ttyUSB0`;

open(FILE, ">/home/ender/sleep/$date"."-sleeplog");
print FILE $sleep;
close(FILE);
