/// <summary> /// Plug a green LED into pins 11 and GND, placing the longer lead (cathode) in pin 11. /// </summary> public static void Main() { // create a new pwm controlled LED on pin 11 var pwmLed = new LEDs.PwmLed(N.PWMChannels.PWM_PIN_D11, LEDs.TypicalForwardVoltage.Green); // start a nice pulse animation pwmLed.StartPulse(); // keep the app running Thread.Sleep(Timeout.Infinite); }
/// <summary> /// Plug a green LED into pins 11 and GND, placing the longer lead (cathode) in pin 11. /// </summary> public static void Main() { // create a new pwm controlled LED on pin 11 var pwmLed = new LEDs.PwmLed(N.PWMChannels.PWM_PIN_D11, LEDs.TypicalForwardVoltage.Green); // alternate between blinking and pulsing the LED while (true) { pwmLed.StartBlink(); Thread.Sleep(5000); // 5 seconds pwmLed.StartPulse(lowBrightness: 0.2F); Thread.Sleep(10000); // 10 seconds } }