Hello,
When i received my FEZ hydra and its display, at the first power up, there was a default program running on it (a logo moving to where the user touches the screen)
Now that I have updated the board to 4.2, I tried the wiki program about Gadgeeter LCD but the display doesn’t seem to react. (completely white)
Here is the code I have in my Program.generated:
using Gadgeteer;
using GTM = Gadgeteer.Modules;
namespace GadgeteerApp1
{
public partial class Program : Gadgeteer.Program
{
// GTM.Module definitions
Gadgeteer.Modules.GHIElectronics.Display_T35 display;
public static void Main()
{
//Important to initialize the Mainboard first
Mainboard = new GHIElectronics.Gadgeteer.FEZHydra();
Program program = new Program();
program.InitializeModules();
program.ProgramStarted();
program.Run(); // Starts Dispatcher
}
private void InitializeModules()
{
// Initialize GTM.Modules and event handlers here.
display = new GTM.GHIElectronics.Display_T35(10, 11, 12, 13);
}
}
}
And the one I have in Program:
void ProgramStarted()
{
display.SimpleGraphics.AutoRedraw = true;
display.WPFWindow.TouchDown += new Microsoft.SPOT.Input.TouchEventHandler(WPFWindow_TouchDown);
display.WPFWindow.TouchUp += new Microsoft.SPOT.Input.TouchEventHandler(WPFWindow_TouchUp);
display.WPFWindow.Invalidate();
Debug.Print("Program Started");
}
void WPFWindow_TouchUp(object sender, Microsoft.SPOT.Input.TouchEventArgs e)
{
display.SimpleGraphics.DisplayText("(" + e.Touches[0].X + "," + e.Touches[0].Y + ")", Resources.GetFont(Resources.FontResources.NinaB),
Colors.Green, (uint)e.Touches[0].X, (uint)e.Touches[0].Y);
}
void WPFWindow_TouchDown(object sender, Microsoft.SPOT.Input.TouchEventArgs e)
{
display.SimpleGraphics.Clear();
display.SimpleGraphics.DisplayText("(" + e.Touches[0].X + "," + e.Touches[0].Y + ")", Resources.GetFont(Resources.FontResources.NinaB),
Colors.Red, (uint)e.Touches[0].X, (uint)e.Touches[0].Y);
}
The Gadgeeter display I am using is this one: http://gadgeteerguy.com/Catalog/ArticleView/tabid/142/ArticleId/5/LCD-Display.aspx
I’ve followed the instruction for the T35 module since I couldn’t find a generic code tutorial for Gadgeeter touch displays in general.
Any idea of what I am doing wrong ?
Thanks a lot
-Thomas