Track My Order
Frequently Asked Questions
International Shipping Info
Mon-Fri, 9am to 12pm and
1pm to 5pm U.S. Mountain Time:
Chat With Us
August 7, 2010
News - Crowdsourcing Algorithms
about 2 years ago
Did some alterations on .ino.
Maybe it runs directly, without alterations now.
Arduino code trial uploaded on Github:
Code was not verified.
Matlab code on Github:
As soon as I have time I will port to Arduino as the code is simple and moving averages have specific libraries already coded.
Hi, I did not have time to port to Arduino, but the code is very simple.
I am posting today, because is the last day…
Approach is three moving averages to smooth the instantaneous acceleration delta and a lower limit to discriminate low acceleration change that is not a hit.
Parameters were established on trial and error to better suit the known results.
Code was tested on Matlab (have fun):
cont=0; % hit count
delta=0; % acceleration instantaneous delta
finalmean=0; % acceleration smoothed
firstmean=90; % parameter for first moving average
secondmean=110; % parameter for second moving average
thirdmean=30; % parameter for third moving average
lowerlimit=80; % hits are above this limit
delta(i)=abs(x(i+1)-x(i))+ abs(y(i+1)-y(i)) + abs(z(i+1)-z(i));
if (finalmean(i+2)<finalmean(i+1)) && (finalmean(i+1)>finalmean(i)) && (finalmean(i+1) > lowerlimit);
x,y and z are your inputs and cont will give you the hits.
On Arduino I believe it can count the hit in real time, after less than 1 second of turned on.
Results: 3: 77 (77), 4: 81 (81), 5: 91 (93), 6: 79 (79), Mistery 1: 190, Mistery 2: 161.
News - A Good Ol' Fashioned Capt…
about 6 years ago
Guess where is the other horn ?
No public wish lists :(
Forgot your password?
No account? Register one!