Exemple #1
0
        public static void DebugPrint(string str)
        {
            for (int i = 0; i < 8; i++)
            {
                Oled.DrawString(1, i, " ");
            }
            Oled.DrawString(1, _lineNum++, "*" + str, false);
            Oled.Refresh();

            if (_lineNum == 8)
            {
                _lineNum = 0;
            }

            Debug.Print(DateTime.Now + ": " + str);
        }
Exemple #2
0
        public static void DisplayText()
        {
            oled.ClearScreen();

            int line = 1;

            oled.DrawString(0, line++, "######################");
            oled.DrawString(0, line++, "   Ada Fruit OLED");
            oled.DrawString(0, line++, "  SSD1306 Display");
            oled.DrawString(0, line++, " & netduino helpers");
            oled.DrawString(0, line++, "   by Fabien Royer");
            oled.DrawString(0, line++, " http://codeplex.com");
            oled.DrawString(0, line++, "######################");
            oled.Refresh();

            Thread.Sleep(1000);
        }
Exemple #3
0
        public static void Main()
        {
            var oled = new AdaFruitSSD1306(
                CHIPSELECT: Pins.GPIO_PIN_D10,
                RESET: Pins.GPIO_PIN_D9,
                DC: Pins.GPIO_PIN_D8,
                CLOCK: Pins.GPIO_PIN_D13,
                DATA: Pins.GPIO_PIN_D11);

            oled.Select(true);

            oled.Initialize();

            while (true)
            {
                oled.Clear();
                oled.DrawBitmap(0, 0, ref netduino, 128, 64, AdaFruitSSD1306.Color.WHITE);

                oled.Display();
                oled.Clear();

                int line = 1;

                oled.DrawString(0, line++, "######################");
                oled.DrawString(0, line++, "   Ada Fruit OLED");
                oled.DrawString(0, line++, "  SSD1306 Display");
                oled.DrawString(0, line++, " & netduino helpers");
                oled.DrawString(0, line++, "   by Fabien Royer");
                oled.DrawString(0, line++, " http://codeplex.com");
                oled.DrawString(0, line++, "######################");

                oled.Display();
            }

            //oled.Select(false);
        }