The Netduino forums have been replaced by new forums at community.wildernesslabs.co.
This site has been preserved for archival purposes only
and the ability to make new accounts or posts has been turned off.
When I debug it throws an argument exception for "button.OnInterrupt += new NativeEventHandler(button_OnInterrupt);" every single time. Have tried hundreds of little changes and tweaks and I could swear it actually worked a few times but cannot figure out what I am doing wrong.
Sorry Nevyn, replacing my code with exactly what you suggested still gives the same issue. Even tried a number of little tweaks and changes to your code and still the same result.
It seems like so many of the libraries and methods for ND3 have changed so much that it is really hard to get back to a working project. And there are very few examples for all these new libraries.
new InterruptPort(Cpu.Pin.GPIO_Pin0, false, Port.ResistorMode.PullUp, Port.InterruptMode.InterruptEdgeLevelHigh);
But this does;
new InterruptPort(Cpu.Pin.GPIO_Pin0, false, Port.ResistorMode.PullUp, Port.InterruptMode.InterruptEdgeHigh);
Notice the different Port.InterruptMode. Not sure what the issue with the InterruptEdgeLevelHigh is.
But what I cannot understand is why now the Interrrupt seems to create ok but it still will not trigger. Despite the fact that if I manually read the button I can see the state change.