Main Site Documentation

ButtonEventHandler Issue


#1

I received by FEZ Spider Kit yesterday and after updating the firmware I started playing around with the getting started example. My first impression was not very good when I did not get any responses to my button presses. After 15 to 20 slow presses I was finally able to get a response at the buttonEventHandler portion of the code and take a picture with the camera.

To trouble shoot this issue, I put together the code listed below to try to reduce the hardware and code to just the BottonEventHandler and the button module. Unfortunately, I am getting the same result with this configuration. Another button module and another different Spider connection point also generate the same result.

Does anyone have any idea if this issue is related to my coding or the Beta nature of the SDK?
.


using System;
using Microsoft.SPOT;
using Microsoft.SPOT.Presentation;
using Microsoft.SPOT.Presentation.Controls;
using Microsoft.SPOT.Presentation.Media;

using GT = Gadgeteer;
using GTM = Gadgeteer.Modules;
using Gadgeteer.Modules.GHIElectronics;

namespace Gadgeteer_ButtonButton
{
    public partial class Program
    {
        void ProgramStarted()
        {
             // Do one-time tasks here
            button.ButtonPressed += new Button.ButtonEventHandler(button_ButtonPressed);
            Debug.Print("Program Started");
        }

        void button_ButtonPressed(Button sender, Button.ButtonState state)
        {
            Debug.Print("Button Pressed");
            button.ToggleLED();
        }
    }
}


#2

Yes there is an issue. We are working on the fix. Please read this:
http://tinyclr.com/forum/21/4276/