I get an Unhandled Exception while running
// Colms[2] = new InputPort((Cpu.Pin)FEZ_Pin.Digital.Di8, true, Port.ResistorMode.PullDown);
//
// An unhandled exception of type âSystem.ArgumentExceptionâ occurred in Microsoft.SPOT.Hardware.dll
//
// see below. This line is pretty much identical to the 2 previous lines which work fine
// All this code is pretty much cut and pasted from other examples on the web site.
namespace Keypad1
{
public class Program
{
static InputPort[] Colms = new InputPort[3];
static OutputPort[] Rows = new OutputPort[4];
static SerialPort UART = new SerialPort(âCOM1â, 4800, Parity.None, 8, StopBits.One);
.
.
.
Colms[0] = new InputPort((Cpu.Pin)FEZ_Pin.Digital.Di6, true, Port.ResistorMode.PullDown);
Colms[1] = new InputPort((Cpu.Pin)FEZ_Pin.Digital.Di7, true, Port.ResistorMode.PullDown);
Colms[2] = new InputPort((Cpu.Pin)FEZ_Pin.Digital.Di8, true, Port.ResistorMode.PullDown);
// The previous line gives me an Unhandled Exception but I donât know why
No, thats not it. I used 2,3,4 and 5 for my Rows and 6,7 and 8 for my columns (and I have 0 and 1 for my Serial port link to SERLCD). Thats all I am using - my program is small at the moment - I plan to add a GPS module to bring in NMEA data, but I wanted to get the LCD and Keypad stuff working first.