Пример #1
0
        void DisplayOre()
        {
            StringBuilder message = new StringBuilder();

            foreach (KeyValuePair <string, double> item in controller_cargo_ore.OreCount())
            {
                message.Append(String.Format("{0:d}:{1}\n", Property.GetKiloFormat(item.Value), item.Key));
            }
            lcd_ore.Print(message, false);
        }
Пример #2
0
        public static void Main()
        {
            _bus = new I2CBus();

            initializeLCD(_bus);

            NetworkInterface networkInterface = NetworkInterface.GetAllNetworkInterfaces()[0];

            LCD.CreateChar(0, new byte[] { 0xFF, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0xFF });
            LCD.CreateChar(1, new byte[] { 0xFF, 0x11, 0x11, 0x11, 0x11, 0x11, 0xFF, 0x00 });
            LCD.CreateChar(2, new byte[] { 0xFF, 0x11, 0x11, 0x11, 0x11, 0xFF, 0x00, 0x00 });
            LCD.CreateChar(3, new byte[] { 0xFF, 0x11, 0x11, 0x11, 0xFF, 0x00, 0x00, 0x00 });
            // Write out messages
            //LCD.Print(Lcd.Position.ROW_1, Lcd.Position.COLUMN_1, Lcd.FillRow(" Tony and Jessie's   "));
            LCD.Print(Lcd.Position.ROW_2, Lcd.Position.COLUMN_1, Lcd.FillRow("     Laser Tag!  "));
            LCD.Print(Lcd.Position.ROW_3, Lcd.Position.COLUMN_1, Lcd.FillRow("     Press Button  "));
            LCD.Print(Lcd.Position.ROW_4, Lcd.Position.COLUMN_1, Lcd.FillRow("     To Start Game  "));
            LCD.SetCursorPosition(0, 0);
            LCD.WriteByte(0x00);
            LCD.WriteByte(0x01);
            LCD.WriteByte(0x02);
            LCD.WriteByte(0x03);
        }