Wiimote Project

Wiimote Projects => Wiimote Interactive Learning & Pedagodgy Discussion => Topic started by: cooolmelody on May 05, 2010, 08:22:32 PM

Title: how to make it holding a key for a while?
Post by: cooolmelody on May 05, 2010, 08:22:32 PM
I want make it like this: shake wiiremote for press and hold a key for 1 second
but I don't know how to do
my english is not good, so please not say something too hard... :)
Title: Re: how to make it holding a key for a while?
Post by: boonjin on May 05, 2010, 09:07:22 PM
Hi,

What do you intend to do with the suggested action? To trigger certain events on the screen?

You may use the Wiimote's accelerometer data for this.

Regards,
Boon Jin
Title: Re: how to make it holding a key for a while?
Post by: cooolmelody on May 05, 2010, 09:14:44 PM
I mean ...like this:

if wiimote.RelAccX > 20
  press (J)     // what I want is holding J  for a second,
end if

I tried this but faild:

if wiimote.RelAccX > 20
  press (J)
  wait 1 second
  release(J)  
end if

Title: Re: how to make it holding a key for a while?
Post by: terrence512 on December 21, 2010, 03:24:20 AM
I have a ball which I want to rotate progressivly in the direction of the arrow key being held down. How can I do this?