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); }
public LcdDisplay() { var lcdProvider = new GpioLcdTransferProvider(Stm32F4Discovery.Pins.PD1, Stm32F4Discovery.Pins.PD2, Stm32F4Discovery.Pins.PD9, Stm32F4Discovery.Pins.PD11, Stm32F4Discovery.Pins.PD10, Stm32F4Discovery.Pins.PD8); _lcd = new Lcd(lcdProvider); _lcd.Begin(Columns, Rows); _lcd.Write("Wait..."); //http://www.quinapalus.com/hd44780udg.html _lcd.CreateChar(0, new byte[] { 0x8, 0x14, 0x8, 0x3, 0x4, 0x4, 0x3, 0x0 }); _lcd.Backlight = false; }
public static void Main() { var lcdProvider = new GpioLcdTransferProvider(Stm32F4Discovery.Pins.PD1, Stm32F4Discovery.Pins.PD2, Stm32F4Discovery.Pins.PD9, Stm32F4Discovery.Pins.PD11, Stm32F4Discovery.Pins.PD10, Stm32F4Discovery.Pins.PD8); var lcd = new Lcd(lcdProvider); lcd.Begin(16, 2); //columns, rows //znaki specjalne //http://www.quinapalus.com/hd44780udg.html var customCharacters = new[] { new byte[] { 0x00, 0x0a, 0x15, 0x11, 0x11, 0x0a, 0x04, 0x00 }, //serce new byte[] { 0x04, 0x02, 0x01, 0x1f, 0x01, 0x02, 0x04, 0x00 } //strzalka }; //ladowanie znakow specjalnych for (int i = 0; i < customCharacters.Length; i++) { lcd.CreateChar(i, customCharacters[i]); } lcd.Clear(); lcd.Write("* Hello World! *"); Thread.Sleep(3000); // lcd.Clear(); // lcd.Encoding = Encoding.UTF8; // lcd.Write("ĄąĆćĘꣳŃńÓ󌜯ż"); // Thread.Sleep(3000); lcd.Clear(); lcd.WriteByte(0); //pierwszy znak specjalny Thread.Sleep(2000); lcd.WriteByte(1); //drugi znak specjalny Thread.Sleep(3000); //nastepna linia lcd.SetCursorPosition(0, 1); lcd.Write("# Bye... #"); }