@ Mike - I did use the designer and changed the name form the properties window… Also i should have mentioned that i can retrieve the position of the joystick correctly when i use
void Button_Interrupt(GT.Interfaces.InterruptInput sender, bool value)
{
Debug.Print("Button state now is: " + (value ? "Up" : "Down"));
}
but nothing in the output window. It seems that no interrupts are getting handled. I also copied the driver code for joystick from codeplex and explicitly added it to my project with a different class name and the same result
I don’t have a button module but i did put the extender module on the same port where the joystick was and with a button ebock on pin 3.
Still no event.
Can anyone in the community test if any interrupt event are getting fired.
Switching out for a button module does not cause the event to raise either.
Update 1
Changing the designer to say it’s a button does work as does having a sketch with nothing but a joystick & T35 display. I’ll have to work through it and see if I can’t find where exactly the disconnect happens.
Update 2
OK, from my end it was the way I’m using Gadgeteer. I actually run regular NETMF and construct modules as needed based off startup data (which allows me to work w/ dynamic modules and switch between device states handheld/console). As soon as I called Program.Run() the event started firing.
That, of course, stems from the Program.CheckAndInvoke that is called in the OnJoystickEvent method, so a modified driver could eliminate the need for calling Program.Run() (not that I need one, I’m happy doing it this way, just info for anyone might need it).
@ Gus: I used a button in the designer as you suggested but still no luck…
I also created a small project with just the hydra and a button but still no event. I have attached the project solution for someone to test out at their end.
[Update] - Just realized i cant attach a zip file… But anyways if any one can test a button module on socket 14 and get an event it would be great…
@ Gus- I did block the thread and once i remove the Thred.Sleep everything was working… Thanks for the help… This is my first experience with Gadgeteer and i though the ProgramStarted method was like the Main method in non gadgeteer netmf.