예제 #1
0
        public override void DrawPixel(int x, int y, bool colored)
        {
            if (x >= Width || x < 0 || y >= Height || y < 0)
            {
                return;
            }

            if (y < 8)
            {
                y *= 2;
            }
            else
            {
                y = (y - 8) * 2 + 1;
            }
            ht16k33.ToggleLed((byte)(y * Width + x), colored);
        }
예제 #2
0
        public override void InvertPixel(int x, int y)
        {
            if (y < 8)
            {
                y *= 2;
            }
            else
            {
                y = (y - 8) * 2 + 1;
            }

            ht16k33.ToggleLed((byte)(y * Width + x));
        }
예제 #3
0
        protected void TestHT16K33()
        {
            Console.WriteLine("TestHT16K33...");

            int  index = 0;
            bool on    = true;

            while (true)
            {
                ht16k33.ToggleLed((byte)index, on);
                ht16k33.UpdateDisplay();
                index++;

                if (index >= 128)
                {
                    index = 0;
                    on    = !on;
                }

                Thread.Sleep(100);
            }
        }