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 

WiiremoteJ and processing

 
Post new topic   Reply to topic    WiiLi.org Forum Index -> WiiremoteJ
View previous topic :: View next topic  
Author Message
darth01



Joined: 06 Feb 2008
Posts: 4

Digg It
PostPosted: Wed Mar 26, 2008 4:09 pm    Post subject: WiiremoteJ and processing

Hey guys
I'm using my wiimote for a college project with processing, i'm trying to smooth out the movement so that my model moves when i move my wiimote, so far i've tried

Code:
   
   float average = 0;
       int sampleSize = 20;
       for(int i = 0; i < sampleSize; i++)
          average += this.y1;
       average = average/sampleSize;
       return average;


this.y1 (is the wiimote data)

is there a better way to smooth out the movement? (this was me in a rush and i've tried changing sample size) also is there a way to stop or prevent re4ceving nan?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    WiiLi.org Forum Index -> WiiremoteJ All times are GMT
Page 1 of 1

 
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