/// <summary> /// Blinks the pin. /// </summary> /// <param name="duration">The blink duration, in millisecond.</param> public void Blink(decimal duration = -1) { connection.Blink(Configuration, duration); }
/// <summary> /// Blinks the pin. /// </summary> /// <param name="duration">The blink duration.</param> public void Blink(TimeSpan duration = new TimeSpan()) { connection.Blink(Configuration, duration); }
private static void TestLEDs() { Console.WriteLine("Test GPIO"); var led1 = ConnectorPin.P1Pin31.Output(); var led2 = ConnectorPin.P1Pin33.Output(); var led3 = ConnectorPin.P1Pin35.Output(); var led4 = ConnectorPin.P1Pin37.Output(); var connection = new GpioConnection(led1, led2, led3, led4); for (int i = 0; i < 5; i++) { connection.Blink(led1, new TimeSpan(0, 0, 1)); connection.Blink(led2, new TimeSpan(0, 0, 1)); connection.Blink(led3, new TimeSpan(0, 0, 1)); connection.Blink(led4, new TimeSpan(0, 0, 1)); } connection.Close(); }