Hi,
Im trying to use the sample code for the 2x16 lcd using Fez Cobra II, and plugging the module into the “1” Y socket on the board but im getting the exception with details of:
“Module Display_HD44780 cannot be used with invalid socket number 1”
My code is:
public static void Main()
{
Gadgeteer.Modules.GHIElectronics.Display_HD44780 display_HD44780 = new Gadgeteer.Modules.GHIElectronics.Display_HD44780(1);
// Clears the screen
display_HD44780.Clear();
// Prints "_____ World" to the top left of the display
display_HD44780.PrintString("_____ World!");
// Places the cursor back at the top left of the screen
display_HD44780.CursorHome();
// Bytes to represent the letters in "Hello"
byte H = (byte)'H';
byte e = (byte)'e';
byte l = (byte)'l';
byte o = (byte)'o';
// Places 'H' in the blank space where this letter goes
display_HD44780.Putc(H);
// Places 'e' in the blank space where this letter goes
display_HD44780.Putc(e);
// Places 'l' in the blank space where this letter goes
display_HD44780.Putc(l);
// Places 'l' in the blank space where this letter goes
display_HD44780.Putc(l);
// Places 'o' in the blank space where this letter goes
display_HD44780.Putc(o);
// Turns the bacl=klight off
display_HD44780.SetBacklight(false);
Thread.Sleep(1000);
// Turns the backlight on
display_HD44780.SetBacklight(true);
}
What socket number should I be using? Is there a working example for the Cobra II?
Thanks,
Ross.