public static void Main() { ST7735 display = new ST7735( NUCLEOF411.Gpio.D8, //Reset NUCLEOF411.Gpio.D7, //BackLight NUCLEOF411.Gpio.D9, //A0 (DC) Control Pin / Data Command NUCLEOF411.SpiDevice.Sp2.Name, //SPI SCK/MOSI NUCLEOF411.Gpio.D10 //chipSelect ); display.TurnOn(); short i = 0; display.DrawCircle(20, 20, 20, Color.Red); display.DrawRectangle(40, 40, 40, 40, Color.Cyan); display.DrawFilledRectangle(80, 80, 40, 40, Color.Blue); display.DrawText(10, 30, "Hello nanoFramework", Color.Green); display.DrawText(30, 60, "from ST7735 SPI", Color.Green); while (true) { i++; display.DrawText(10, 10, i.ToString(), Color.Green); Thread.Sleep(500); } }
public static void Main() { ST7735 display = new ST7735( STM32F411RE.Hardware.ArduinoPin.D8, //Reset STM32F411RE.Hardware.ArduinoPin.D7, //BackLight STM32F411RE.Hardware.ArduinoPin.D9, //A0 (DC) Control Pin / Data Command STM32F411RE.Hardware.SpiDevices.SPI2, //SPI SCK/MOSI STM32F411RE.Hardware.ArduinoPin.D10 //chipSelect ); display.TurnOn(); short i = 0; display.DrawCircle(20, 20, 20, Color.Red); display.DrawRectangle(40, 40, 40, 40, Color.Cyan); display.DrawFilledRectangle(80, 80, 40, 40, Color.Blue); display.DrawText(10, 30, "Hello .NET Microframework", Color.Green); display.DrawText(30, 60, "from ST7735 SPI", Color.Green); while (true) { i++; display.DrawText(10, 10, i.ToString(), Color.Green); Thread.Sleep(500); } }
public static void Main() { ST7735 DisplayShield = new ST7735(Pins.GPIO_PIN_D8, Pins.GPIO_PIN_D10, SPI_Devices.SPI1); int i = 0; // Rectangle DisplayShield.DrawFilledRectangle(0, 0, 160, 128, Color.Black); Thread.Sleep(1000); DisplayShield.DrawLargeText(20, 30, ".NEMF v4.3", Color.Green); while (true) { DisplayShield.DrawText(30, 60, "Count: " + i++, Color.Magenta); Thread.Sleep(10); } }
public static void Main() { ST7735 DisplayShield = new ST7735(FEZPandaIII.Gpio.D8, FEZPandaIII.Gpio.D10, FEZPandaIII.SpiBus.Spi1); int i = 0; // Rectangle DisplayShield.DrawFilledRectangle(0, 0, 160, 128, Color.Black); Thread.Sleep(1000); DisplayShield.DrawLargeText(20, 30, ".NEMF v4.3", Color.Green); while (true) { DisplayShield.DrawText(30, 60, "Count: " + i++, Color.Magenta); Thread.Sleep(10); } }