Example #1
0
        private static void Main(string[] args)
        {
            CoreDeviceFactory.Init();

            ISenseHat senseHat = SenseHatFactory.GetSenseHat();

            DemoSelector
            .GetDemo(senseHat, text => { })
            .Run();
        }
Example #2
0
        private static void Main(string[] args)
        {
            CoreDeviceFactory.Init();
            ISenseHat senseHat = SenseHatFactory.GetSenseHat();

            demoDictionary = new Dictionary <string, Tuple <SenseHatDemo, string> >()
            {
                { "1", new Tuple <SenseHatDemo, string>(new DiscoLights(senseHat), "Click on the joystick to change drawing mode!") },
                { "2", new Tuple <SenseHatDemo, string>(new JoystickPixel(senseHat, setScreenText), "Use the joystick to move the pixel around.") },
                { "3", new Tuple <SenseHatDemo, string>(new WriteTemperature(senseHat, setScreenText), "Is it only me or does it show some unusual high temperature? :-S") },
                { "4", new Tuple <SenseHatDemo, string>(new GravityBlob(senseHat, setScreenText), "The green blob is drawn to the center of the earth! If you hold it upside down it gets angry and turns red. :-O") },
                { "5", new Tuple <SenseHatDemo, string>(new Compass(senseHat, setScreenText), "Note! You must calibrate the magnetic sensor by moving the Raspberry Pi device around in an 'eight' figure a few seconds at startup!") },
                { "6", new Tuple <SenseHatDemo, string>(new SingleColorScrollText(senseHat, "Hello Raspberry Pi 3 Sense HAT!"), "Click on the joystick to change drawing mode!") },
                { "7", new Tuple <SenseHatDemo, string>(new MultiColorScrollText(senseHat, "Hello Raspberry Pi 3 Sense HAT!"), "") },
                { "8", new Tuple <SenseHatDemo, string>(new SpriteAnimation(senseHat), " Use the joystick to move Mario. The middle button switches orientation and flipping of the drawing.") },
                { "9", new Tuple <SenseHatDemo, string>(new GammaTest(senseHat), "Tries out different gamma settings for the LED display. Use the joystick to play around.") },
                { "10", new Tuple <SenseHatDemo, string>(new ReadAllSensors(senseHat, setScreenText), "Shows an example of how to read all the different sensors.") },
                { "11", new Tuple <SenseHatDemo, string>(new BinaryClock(senseHat, setScreenText), "Shows a binary clock (by Mark Muller)") }
            };

            RunInteractive(senseHat);
            //await RunNonInteractive(senseHat);
        }