WiimoteState.Button question

Aug 14, 2011 at 1:37 PM

Hi Guys (and perhaps some girls)

I'm pretty new to C#, but things are going alright with a project I'm doing right now using the Wiimote.

I've gotten to the point where I can easily set the rumble, LED's etc, but I'm having trouble reading data from the wiimote using WiimoteState.
I'm used to doing hardware programming in C, and it uses a very nice system of interrupts, but I suppose the Wiimote doesn't generate an interrupt when a button is pushed. This, combined with my lack of knowledge concerning C#, has left me in a predicament. Do I need to create a loop that constantly does the wiimotestate.button check or is there a better way of getting inputs from the Wiimote?

Thanks

Blanketman

Coordinator
Aug 14, 2011 at 2:57 PM
Take a look at the WiimoteTest app included with the library. It demonstrates how to setup events to receive notifications of hardware state changes (buttons pressed, accelerometers changed, etc.)



On Aug 14, 2011, at 8:37 AM, "Blanketman" <notifications@codeplex.com> wrote:

From: Blanketman

Hi Guys (and perhaps some girls)

I'm pretty new to C#, but things are going alright with a project I'm doing right now using the Wiimote.

I've gotten to the point where I can easily set the rumble, LED's etc, but I'm having trouble reading data from the wiimote using WiimoteState.
I'm used to doing hardware programming in C, and it uses a very nice system of interrupts, but I suppose the Wiimote doesn't generate an interrupt when a button is pushed. This, combined with my lack of knowledge concerning C#, has left me in a predicament. Do I need to create a loop that constantly does the wiimotestate.button check or is there a better way of getting inputs from the Wiimote?

Thanks

Blanketman