darth01
Joined: 06 Feb 2008 Posts: 4
Digg It |
Posted: 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? |
|