예제 #1
0
        static void Main(string[] args)
        {
            UpTime = Stopwatch.StartNew();

            Logger.Clear();
            Logger.Log("Sharp Clock v0.7.7");

            ParseCommands(args);
            HandleUnixSignals();

            var GPIOevents = new GPIO();
            var Screen     = new PixelDraw();

            LoadingAnimation.Run(Screen);

            var Pixel = new PixelRenderer(PixelDraw.Screen);

            PixelModule.SetScreen(Screen);
            PixelModule.SetGPIO(GPIOevents);
            PixelModule.SetRenderer(Pixel);
            WebServer = new HttpServer("WebPage");
            WebServer.Start();

            Pixel.Start();

            PostHandler postHandler = new PostHandler(WebServer);
        }
예제 #2
0
 public static void Kill()
 {
     Logger.Log();
     WebServer.Stop();
     LoadingAnimation.Stop();
     PixelRenderer.Pixel.Stop();
     Logger.Log("Shutingdown");
 }