Beispiel #1
0
        public virtual void DrawPixel(int x, int y, Color color, byte brightness)
        {
            if (x > 7)
            {
                x  = 15 - x;
                y += 8;
            }
            else
            {
                y = 7 - y;
            }

            //Swap
            var temp = x;

            x = y;
            y = temp;

            if (color == Color.Black)
            {
                iS31FL3731.SetLedPwm(Frame, (byte)(x + y * 16), 0);
            }
            else
            {
                iS31FL3731.SetLedPwm(Frame, (byte)(x + y * 16), brightness);
            }
        }
Beispiel #2
0
        void Brightness()
        {
            byte brightness = 0;
            byte led        = 0;

            for (byte y = 0; y < 144; y++)
            {
                if (brightness >= 255)
                {
                    brightness = 0;
                }

                _iS31FL3731.SetLedPwm(led, brightness);
                led++;
                brightness += 2;
                Thread.Sleep(100);
            }
        }