function TwatchShowTime(&$socket, $delay = -1) { setlocale(LC_ALL, 'nl_NL.UTF8'); $time[1] = ' '; $time[2] = strftime('%d %B %Y'); $len = strlen($time[2]); $time[2] = AlignRow($time[2], 'center'); $day3 = strftime('%A'); $time3 = strftime('%R'); $spacer = $len - strlen($day3 . $time3); $time[3] = $day3 . str_pad('', $spacer, ' ') . $time3; $time[3] = AlignRow($time[3], 'center'); $time[4] = $time[1]; TwatchPrintRows($socket, $time, $delay, 'center'); if ($delay != -1) { sleep($delay); } }
sleep(4); TwatchPrintRows($socket, $align, 1); TwatchClearSCreen($socket); sleep(4); TwatchScrollPage($socket, $scrollpage, 2); TwatchClearSCreen($socket); sleep(4); TwatchPagePage($socket, $pagepage, 5); TwatchClearSCreen($socket); sleep(4); TwatchScrollRows($socket, $scrollrows); TwatchClearSCreen($socket); TwatchPrint($socket, $showtime); sleep(4); TwatchShowTime($socket); TwatchClearSCreen($socket); TwatchPrint($socket, $scrollascii); sleep(4); TwatchScrollAscii($socket, 'hi'); sleep(4); TwatchScrollAscii($socket, 'scroll'); TwatchClearSCreen($socket); sleep(4); TwatchPrintRows($socket, $feedback, 1, 'center'); sleep(10); TwatchBacklightOff($socket); TwatchBacklightOff($socket); TwatchBacklightOff($socket); TwatchBacklightOff($socket); TwatchBacklightOff($socket); TwatchDisconnect($socket);