Beispiel #1
0
    public static void Main()
    {
        //todo: include electrical schematics

        /*  Pick a driver that matches your hardware setup */
        IDriveTextDisplays driver = null;

        // GPIO or MCP23017 driver
        driver = GetGpio8Driver();
        //driver = GetGpio4Driver();
        //driver = GetMcp8Driver();
        //driver = GetMcp4Driver();

        CharacterDisplay lcd = new CharacterDisplay(20, 4, driver)
        {
            IsCursorBlinking   = false,
            IsCursorUnderlined = false
        };

        /* Hook user input buttons */
        IRunnerUserInput input = null;

        // GPIO or MCP23017 indirected
        input = GetGpioInput();

        /* Run the tests */
        lcd.ClearScreen();
        TextTestHarness.RunTests(Assembly.GetExecutingAssembly(), lcd, input);
    }
Beispiel #2
0
    public static void Main()
    {
        /*  Pick a driver that matches your hardware setup */
        IDriveTextDisplays driver = null;

        CharacterDisplay lcd = new CharacterDisplay(20, 4, driver)
        {
            IsCursorBlinking   = false,
            IsCursorUnderlined = false
        };

        /* Hook user input buttons */
        IDigitalInterrupt startTests = Signals.DigitalInterrupt.Bind(Pin.Pin1, "Restart Testing", ResistorMode.PullUp, InterruptMode.InterruptEdgeLow, 50);
        var input = new GpioInput(startTests);

        /* Run the tests */
        lcd.ClearScreen();
        TextTestHarness.RunTests(Assembly.GetExecutingAssembly(), lcd, input);
    }