Question

I have been working with the Freescale Development board i.MX53 which it has an embeded accelometer.

What I have to do, it's to create a little web app to show some characteristics of the embeded systems in the board, including the accelerometer and other stuff.

I'm using JavaScript and Node.js to build the sample app, but I don't know how to create an app to read the accelerometer data (server side) from the board and show the data on any browser accessing from another device, but every try I made reads the data from the client accelerometer instead (phones, tablets, etc).

What I want to do!

  1. I want to create a simple app to show the axes and rotation values in real time, something like what is shown in this demo (accelerometer for Safari Mobile) created for Safari Mobile, but I want it to work platform independent.
  2. As the demo shown at the first point, I also want to create a CSS circle inside a box to show the movement, in this part, I just would like to hear some suggestions about the way to accomplish this task.

Accelerometer with JavaScript and CSS

Was it helpful?

Solution

I am not 100% sure what you will be running on that device, but on the specs it says it supports different OS. If you are planning to do something platform independent but with support for a modern browser, you could try reading this link which has a nice explanation of the current draft of the orientation API on HTML5 http://www.html5rocks.com/en/tutorials/device/orientation/.

If you are developing a native application, I am sure that any platform with networking capabilities will have support for a socket connection; in this case, then you could write a small native app that reads the accelerometer input and publishes it to your Node.js app using sockets to read this inputs and then build on top of it a web app that will let you monitor such values.

OTHER TIPS

Did you take a look at DeviceOrientation Event? Here: http://dev.w3.org/geo/api/spec-source-orientation.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top