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); }
public EmulatorButtons() { _startTests = Signals.DigitalInterrupt.Bind(EmulatorPins.Select, "Restart Tests", ResistorMode.PullUp, InterruptMode.InterruptEdgeLow); _scrollUp = Signals.DigitalInterrupt.Bind(EmulatorPins.Up, "Scroll Up", ResistorMode.PullUp, InterruptMode.InterruptEdgeLow); _scrollDown = Signals.DigitalInterrupt.Bind(EmulatorPins.Down, "Scroll Down", ResistorMode.PullUp, InterruptMode.InterruptEdgeLow); }
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); }
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); }
private static IRunnerUserInput GetGpioInput() { IDigitalInterrupt start = Signals.DigitalInterrupt.Bind((Pin)SecretLabsPinAssignment.GPIO_PIN_D0, "Start Tests", ResistorMode.PullUp, InterruptMode.InterruptEdgeLow, 50); IDigitalInterrupt up = Signals.DigitalInterrupt.Bind((Pin)SecretLabsPinAssignment.GPIO_PIN_D1, "Start Tests", ResistorMode.PullUp, InterruptMode.InterruptEdgeLow, 50); IDigitalInterrupt down = Signals.DigitalInterrupt.Bind((Pin)SecretLabsPinAssignment.GPIO_PIN_D2, "Start Tests", ResistorMode.PullUp, InterruptMode.InterruptEdgeLow, 50); return(new GpioInput(start, up, down)); }
public GpioInput(IDigitalInterrupt startTests, IDigitalInterrupt scrollUp = null, IDigitalInterrupt scrollDown = null) { StartTests = startTests; ScrollUp = scrollUp; ScrollDown = scrollDown; }