Ok - issue 2 - making the display work?
I’ve tried several variations of the program below - that one is from a message from Markdav about display colors - so he apparently had it working?
When the program runs - the display remains stubbornly blank.
I’m finding that AutoRedraw is set true already in ProgramStarted, but I don’t appear to get a redraw - even when I call Redraw().
Curiously - after drawing, if I hit reset, I see the display briefly (until the reboot clears it).
namespace DisplayTest1
{
using System.Threading;
using Microsoft.SPOT;
using GT = Gadgeteer;
public partial class Program
{
void ProgramStarted()
{
Debug.Print("enter ProgramStarted");
if (display.SimpleGraphics.AutoRedraw)
{
Debug.Print("AutoRedraw true");
}
else
{
Debug.Print("AutoRedraw false");
}
Microsoft.SPOT.Font DispFont = Resources.GetFont(Resources.FontResources.small);
int yloc;
// Do one-time tasks here
display.SimpleGraphics.Clear();
display.SimpleGraphics.AutoRedraw = true;
yloc = DispFont.Height;
display.SimpleGraphics.DisplayText("Hello World - White", DispFont, GT.Color.White, 15, (uint)yloc); //ok
yloc += (DispFont.Height);
display.SimpleGraphics.DisplayText("Hello World - Red", DispFont, GT.Color.Red, 15, (uint)yloc); //ok
yloc += (DispFont.Height);
display.SimpleGraphics.DisplayText("Hello World - Green", DispFont, GT.Color.Green, 15, (uint)yloc); //no colour
yloc += (DispFont.Height);
Debug.Print("done DisplayText's");
Thread.Sleep(5000);
Debug.Print("done sleep - exit ProgramStarted");
}
}
}