My thought is to test your potential pitching speed.
Actually, I'm using the acceleration sensor to calculate the speed but it's hard to determine your pitching time.
So, I'm pretending it's to be a fun speed detector.
Following is my final project.
clear all;connector onclear m;m = mobiledev;one = 0;discardlogs(m); while one==0 %Player1's round to roll the dice. m.Logging = 1;pause(2);m.Logging = 0;[ac, tac] = accellog(m); %take acceleration.z = ac(:,3); %take Z-axe.speed1 = max(z);assignin('base','z',speed1);load_system('process');sim('process');r = max(o);fprintf('Your speed is %2f km/hr\n',speed1);if(r==1) imshow('lossser.jpg'); one=1;endif(r==2) imshow('notbad.jpg'); one=1;endif(r==3) imshow('weiyin.jpg'); one=1;endif(r==4) imshow('god.jpg'); one=1;endendIT will show up the speed in the command window.
And can tell you how fast it is