Hi, I have just received my Domino and LCD Keypad (red board). I have updated to the latest firmware (v4.1) and started a project in VS2010. No problems following instructions up to here.
I wrote a small app to test that the LCD was working (see attached file). It is compiled with FEZ_Shield_KeypadLCD_Red.cs in the project. The LED flashes correctly and I can turn the LCD backlight on and off but no text appears. I have tried adjusting the contrast but to no avail.
What next?
using System;
using Microsoft.SPOT;
using System.Threading;
using GHIElectronics.NETMF.FEZ;
using Microsoft.SPOT.Hardware;
namespace FEZ_Project1
{
public class Program
{
public static void Main()
{
OutputPort LED;
LED = new OutputPort((Cpu.Pin)FEZ_Pin.Digital.LED, true); //Thread.Sleep(Timeout.Infinite);
for (int i = 0; i < 5; i++)
{
LED.Write(true);
Thread.Sleep(200);
LED.Write(false);
Thread.Sleep(200);
}
FEZ_Shields.KeypadLCD.Initialize();
FEZ_Shields.KeypadLCD.TurnBacklightOn();
//FEZ_Shields.KeypadLCD.CursorHome();
FEZ_Shields.KeypadLCD.SetCursor(0, 0);
FEZ_Shields.KeypadLCD.Print(“Welcome 0!”);
FEZ_Shields.KeypadLCD.SetCursor(1, 0);
FEZ_Shields.KeypadLCD.Print(“Welcome 1!”);
first, please use the code highlighting. You can use it by clicking the code button above (the one with the 101010)
next, try the example code, does this work? Your code is a little messy, so please try the example code first.
Here it is:
using System;
using System.Threading;
using Microsoft.SPOT;
using GHIElectronics.NETMF.FEZ;
public class Program
{
public static void Main()
{
FEZ_Shields.KeypadLCD.Initialize();
FEZ_Shields.KeypadLCD.TurnBacklightOn();
int i = 0;
while (true)
{
FEZ_Shields.KeypadLCD.CursorHome();
FEZ_Shields.KeypadLCD.Print("Count " + i++);
FEZ_Shields.KeypadLCD.SetCursor(1, 2);
switch (FEZ_Shields.KeypadLCD.GetKey())
{
case FEZ_Shields.KeypadLCD.Keys.Up:
FEZ_Shields.KeypadLCD.Print("Up ");
break;
case FEZ_Shields.KeypadLCD.Keys.Down:
FEZ_Shields.KeypadLCD.Print("Down ");
break;
case FEZ_Shields.KeypadLCD.Keys.Left:
FEZ_Shields.KeypadLCD.Print("Left ");
break;
case FEZ_Shields.KeypadLCD.Keys.Right:
FEZ_Shields.KeypadLCD.Print("Right ");
break;
case FEZ_Shields.KeypadLCD.Keys.Select:
FEZ_Shields.KeypadLCD.Print("Select");
break;
case FEZ_Shields.KeypadLCD.Keys.None:
FEZ_Shields.KeypadLCD.Print(" ");
break;
}
Thread.Sleep(100);
}
}
}