BlinkStickDotNet.BlinkStick.Blink C# (CSharp) Метод

Blink() публичный Метод

Blink the LED on BlinkStick Pro.
public Blink ( byte channel, byte index, byte r, byte g, byte b, int repeats = 1, int delay = 500 ) : void
channel byte Channel (0 - R, 1 - G, 2 - B)
index byte Index of the LED
r byte The red component.
g byte The green component.
b byte The blue component.
repeats int How many times to repeat (default 1)
delay int Delay delay between on/off sequences (default 500)
Результат void
        public void Blink(byte channel, byte index, byte r, byte g, byte b, int repeats=1, int delay=500)
        {
            for (int i = 0; i < repeats; i++)
            {
                this.InternalSetColor(channel, index, r, g, b);

                if (!WaitThread(delay))
                    return;

                this.InternalSetColor(channel, index, 0, 0, 0);

                if (!WaitThread(delay))
                    return;
            }
        }

Same methods

BlinkStick::Blink ( RgbColor color, int repeats = 1, int delay = 500 ) : void
BlinkStick::Blink ( byte channel, byte index, RgbColor color, int repeats = 1, int delay = 500 ) : void
BlinkStick::Blink ( byte r, byte g, byte b, int repeats = 1, int delay = 500 ) : void
BlinkStick::Blink ( byte channel, byte index, string color, int repeats = 1, int delay = 500 ) : void
BlinkStick::Blink ( string color, int repeats = 1, int delay = 500 ) : void

Usage Example

Пример #1
0
 /// <summary>
 /// Helper for doing ad-hoc testing
 /// </summary>
 public static void Main()
 {
     // add code here
     #if false
     var bs = new BlinkStick();
     bs.Verbosity = Verbosity.Debug;
     bs.Blink(Color.Red, 1000);
     #endif
 }
All Usage Examples Of BlinkStickDotNet.BlinkStick::Blink