iOS CoreMotion 13 May 2012Posted by David Wilson in General.
Something else I’ve been experimenting with lately. CoreMotion under iOS on the iPhone.
You can see from the screen shot above that a lot of statistical data can be extracted from iOS. Actually that’s very easy to do. The challenge comes in doing something useful with that data. I am able to successfully implement the usage of reference frames and understand what’s happening there. Unfortunately the Mathematicians had a field day after that and introduced Quaternion (http://en.wikipedia.org/wiki/Quaternion) and Rotation Matrix (http://en.wikipedia.org/wiki/Rotation_matrix).
What am I trying to do?
Many of the available articles on the net or questions at http://stackoverflow.com talk about detecting a golf swing… I’m not trying to detect a golf swing but I am trying to detect a swing.
I may be making progress. Where I’m at now is measuring userAcceleration of CMDeviceMotion. userAcceleration (x, y, z) above an arbitrary number begging the process of capturing samples…. when the acceleration on all three axis falls below the arbitrary value then the samples are then all added together divided by the number of samples and multiplied by the time giving a velocity. This is shown in the screen shot above (red text on light green background). below is some sample debug output.
2012-05-13 14:52:24.511 iTest[5161:707] timeStart=116260.614214, TimeEnd=116261.019768, timeDuration=0.405554
2012-05-13 14:52:24.513 iTest[5161:707] x=-0.247293, y=0.263759, z=0.323034
2012-05-13 14:52:24.515 iTest[5161:707] x=0.037945, y=0.267724, z=-0.237428
2012-05-13 14:52:24.517 iTest[5161:707] x=1.686204, y=1.664073, z=-1.194653
2012-05-13 14:52:24.519 iTest[5161:707] x=-0.960586, y=2.531593, z=2.098828
2012-05-13 14:52:24.520 iTest[5161:707] x=0.000058, y=0.430671, z=0.036303
2012-05-13 14:52:24.522 iTest[5161:707] TOTAL x=0.516329, y=5.157821, z=1.026084
2012-05-13 14:52:24.524 iTest[5161:707] VELOCITY velocity=0.543462
Now in theory??? the velocity number will equate to a distance of movement…. And I guess if I use the net of X, Y, Z I may even know where in 3D space the phone has been moved to?
I’m looking forward to getting past this and onto more of the applications real implementation.
LED Message Board 13 May 2012Posted by David Wilson in General.
The software supports multiple LED Message Boards, all you have to do is plug them in. Even better the software simulates the presence of a LED Message Board which means you don’t have to have one connected as all. This means you can you your gigantic 27″ iMac screen as a 7 x 21 LED Message Board!
You can set the message board to display text, static images or a directory of images. the document window is shown below.
And you can set attributes for speed, loops, direction on each, and loop the entire document!
On the simulated LED Window you can click the individual LED’s yourself. The program lets you save what’s on the simulated LED display thus allowing you to save a sequence of images so that you can play these back using the movie or directory feature.
The LED Message Board is now available for download c/- Dream Cheeky at http://dreamcheeky.com/sites/default/files/LEDMessageBoard.dmg
The software is written for Mac OS 10.7 and above and has been signed for Mountain Lion.