Wrote two simple java applications:
First one sends sensor reading from phone over WiFi, and second app on PC receives that data and charts each axis of accelerometer in different color.
Chart shows 1g (but in strange int numbers) acceleration from earth gravitation on different axises of the sensor. This actually simulates gyro. At the end of the video I zoom in on chart line to show sensor noise. Going to use Kalman filter to reduce it.
Also at the end I show CPU load. It is caused by moving chart which contains too much points and lines - when I pause charting but continue receiving data, CPU load goes down to normal idle level.
Charting: used JFreeChart library: http://www.jfree.org/jfreechart/
Networking:
On phone - converting measured values + measurement time to byte array (big endian of course ;) ) and sending as UDP datagrams to specified IP:port.
On PC - used my library for UDP comm from Java Autopilot project. But using standard datagram facilities of java is also very easy.
how i can do that????
dannytabarez 9 months ago
can u please send me both apps for the pc and phone my email id is sunnyduvani@gmail.com
i was trying to make the same kind of app using qt sdk for nokia and c# for pc ..
sunnyduvani 1 year ago