A simple accelerometer applicaiton in .js