Beispiel #1
0
    public static void Main()
    {
        DigitalLed        led        = new DigitalLed(Pin.Pin0);
        IDigitalInterrupt startTests = Signals.DigitalInterrupt.Bind(Pin.Pin1, "Restart Testing", ResistorMode.PullUp, InterruptMode.InterruptEdgeLow, 50);
        var input = new GpioInput(startTests);

        LedTestHarness.RunTests(Assembly.GetExecutingAssembly(), led, input);
    }
Beispiel #2
0
    public static void Main()
    {
        DigitalLed        led        = new DigitalLed((Pin)SecretLabsPinAssignment.ONBOARD_LED);
        IDigitalInterrupt startTests = Signals.DigitalInterrupt.Bind((Pin)SecretLabsPinAssignment.GPIO_PIN_D0,
                                                                     "Restart Testing",
                                                                     ResistorMode.PullUp,
                                                                     InterruptMode.InterruptEdgeLow,
                                                                     50);
        var input = new GpioInput(startTests);

        LedTestHarness.RunTests(Assembly.GetExecutingAssembly(), led, input);
    }
Beispiel #3
0
 protected override void DisposeManagedResources()
 {
     if (_i2CBus != null)
     {
         _i2CBus.Dispose();
         _i2CBus = null;
     }
     if (_spiBus != null)
     {
         _spiBus.Dispose();
         _spiBus = null;
     }
     if (_onboardLed != null)
     {
         _onboardLed.Dispose();
         _onboardLed = null;
     }
 }