WiiLi Wiki frontpage Include your post in the News Get links Hoteles Quito
WiiLi.org Forum Index WiiLi.org
a new revolution
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Newbie question
Goto page Previous  1, 2, 3, 4, 5  Next
 
Post new topic   Reply to topic    WiiLi.org Forum Index -> GlovePie
View previous topic :: View next topic  
Author Message
the-white_knight3



Joined: 27 Jan 2007
Posts: 31

Digg It
PostPosted: Sun Jan 28, 2007 6:28 pm    Post subject:

Ok, this works every time for me. Produces aa's till I let go, and dd's till I let go. So maybe your right... but the robot turns when you press the d key right?

anyways, this was working for me:

Code:

if (Wiimote.Left) then
   var.left = "Left";
   press(key.A);
else
   release(key.A);
   var.left = "No-Left";
endif

if (Wiimote.Right) then
   var.right = "Right";
   press(key.D);
else
   release(key.D);
   var.right = "No-Right";
endif


debug = var.left + " " + var.right;
Back to top
View user's profile Send private message
cheng



Joined: 27 Jan 2007
Posts: 33

Digg It
PostPosted: Sun Jan 28, 2007 9:40 pm    Post subject: Re: Newbie question

Thanks Tiago, I didn't know there is a KeepDown function.

Thank you again the-white_knight3!

Yes, the robot turns when I press down the d key. I am gonna try out your script now
Back to top
View user's profile Send private message
cheng



Joined: 27 Jan 2007
Posts: 33

Digg It
PostPosted: Sun Jan 28, 2007 9:54 pm    Post subject:

Hey white_knight:

Your script works fine but the robot still doesn't wanna to turn....

One thing that I oberserved though:

When GlovePie is not running, both "A" and "D" keys on the keyboard works, and the robot turns

When GlovePie is running (Running the script), both "A" and "D" keys on the keyboard starts to behave strangely. wiimote.right works with both of mine and your script, but wiimote.left doesn't work at all with both of our scripts.

Once I stop GlovePie, the keyboard starts to work again..... I am totally confuse, it seems that there is some interference between GlovePie and the keyboard??
Back to top
View user's profile Send private message
the-white_knight3



Joined: 27 Jan 2007
Posts: 31

Digg It
PostPosted: Sun Jan 28, 2007 10:04 pm    Post subject:

Are you running the above code with more code for the robot? Because if you are you might want to try just running that above and try. But yeah, that is kinda weird.


Can you change which keys you need to use? I doubt the key itself is the problem though, I'm thinking that the method that GlovePIE uses keys, and the method that your Robot program listens for the keys are conflicting with each other maybe?

You might have to explain the problem to Carl and see if he knows.
Back to top
View user's profile Send private message
cheng



Joined: 27 Jan 2007
Posts: 33

Digg It
PostPosted: Sun Jan 28, 2007 10:39 pm    Post subject:

I tried to run your code along, it still doesn't work.

Also, I tried to change the A key to Z key, it doesn't work either
Back to top
View user's profile Send private message
the-white_knight3



Joined: 27 Jan 2007
Posts: 31

Digg It
PostPosted: Sun Jan 28, 2007 11:31 pm    Post subject:

That's too bad.

Hmm... in the code before... where the keys
were set equal to the remote buttons, did that at least make the bot move a bit in the right direction? Cause if it did we could make it do what you want.

If it didn't... I really don't know, you might have to try one of the other programs.
Back to top
View user's profile Send private message
cheng



Joined: 27 Jan 2007
Posts: 33

Digg It
PostPosted: Mon Jan 29, 2007 2:45 am    Post subject:

No, it didn't turn to the right

but when I map it to go forward which is the "w" key, it worked......
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    WiiLi.org Forum Index -> GlovePie All times are GMT
Goto page Previous  1, 2, 3, 4, 5  Next
Page 4 of 5

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group