I've been experimenting with interrupts on the Netduino while trying out VS2012 and I got this error message:
"Error 1 No overload for [color=#ff0000;]'switchInterrupt_OnInterrupt'[/color] matches delegate 'Microsoft.SPOT.Hardware.NativeEventHandler' C:Usersmoodydocumentsvisual studio 2012ProjectsLED-TestingLED-TestingProgram.cs 19 44 LED-Testing"
AND
"Error 2 The type or namespace name 'ResourceUtility' does not exist in the namespace 'Microsoft.SPOT' (are you missing an assembly reference?) C:Usersmoodydocumentsvisual studio 2012ProjectsLED-TestingLED-TestingResources.Designer.cs 30 45 LED-Testing"
Here's my code
using System;using System.Threading;using Microsoft.SPOT;using Microsoft.SPOT.Hardware;using SecretLabs.NETMF.Hardware;using SecretLabs.NETMF.Hardware.Netduino;namespace MicroFrameworkFlashlight{ public class MicroFrameworkFlashlight { static InputPort switchPin; static OutputPort lampOutput; static InterruptPort switchInterrupt; public static void Main() { lampOutput = new OutputPort(Pins.ONBOARD_LED, false); switchInterrupt = new InterruptPort(Pins.ONBOARD_SW1,false,Port.ResistorMode.PullDown,Port.InterruptMode.InterruptEdgeBoth); switchInterrupt.OnInterrupt += switchInterrupt_OnInterrupt; while (true) { Thread.Sleep(Timeout.Infinite); } } static void switchInterrupt_OnInterrupt(Cpu.Pin port, bool state, TimeSpan time) { lampOutput.Write(state); } }}
I know this is a newbie issue but I've done some research and couldn't find anything so far.
Many thanks in advance & Cheers