I may have missed something in docs

Fez Domino:

Code:


InputPort Btn;
Btn = new InputPort((Cpu.Pin)FEZ_Pin.Interrupt.LDR, false, Port.ResistorMode.PullUp);
Btn.OnInterrupt += new NativeEventHandler(Btn_OnInterrupt); //THIS IS WHERE THE EXCEPTION IS BEING THROWN.

Did I miss something?

You should declare an InterruptPort, not an InputPort :wink:

like this:


      InterruptPort Btn;
      Btn = new InterruptPort((Cpu.Pin)FEZ_Pin.Interrupt.LDR, false, Port.ResistorMode.PullUp, Port.InterruptMode.InterruptEdgeBoth);
      Btn.OnInterrupt += new NativeEventHandler(Btn_OnInterrupt);

Bingo!

I am now convinced that I just have to do the due diligence on making sure I pick right classes.
This is easy but totally diffrent from using a PC controller board to call external devices. (And a heck of a lot cheaper.)

Thx!