Color displays supported using BrainPad
BrainPad now supports full color displays. Just last month we added JavaScript support this week we added support for color displays. Graphics is supported on a few color SPI displays: ILI9342,ST7735, and ILI9341. Visit the BrainPad Lessons page for details using your coding language of choice.
I have purchased a display with the ST7735S controller. With Visual Studio and the nuget package GHIElectronics.DUELink 1.1.1 the display almost works. At the right and bottom edge remain lines with random content. Does anyone know how to fix this?
LCD (duelink.com)
Take a look at Display Configuration => Draw Window
There is 0x2100, mean x = 1, y = 2
try 0x0000 (x = 0, y =0).
This C# code does the job. All pixels are black and pixel (0,0) is in the upper left corner:
var availablePort = DUELinkController.GetConnectionPort();
var BrainPad = new DUELinkController(availablePort);
int reset = 8;
int backlight = 1;
BrainPad.Digital.Write(backlight, true); // Enable backlight
BrainPad.Digital.Write(reset, true); // release reset
BrainPad.Display.Configuration.Type = DisplayType.ST7735;
BrainPad.Display.Configuration.SpiChipSelect = 16;
BrainPad.Display.Configuration.SpiDataControl = 12;
BrainPad.Display.Configuration.SpiPortrait = false;
BrainPad.Display.Configuration.SpiFlipScreenVertical = false;
BrainPad.Display.Configuration.SpiFlipScreenHorizontal = true;
BrainPad.Display.Configuration.SpiSwapByteEndianness = false;
BrainPad.Display.Configuration.SpiSwapRedBlueColor = false;
BrainPad.Display.Configuration.WindowStartX = 1;
BrainPad.Display.Configuration.WindowStartY = 2;
BrainPad.Display.Configuration.Update();
BrainPad.Display.Clear(0x000000); // black
BrainPad.Display.Show();