lethandler = function(e) { let {acceleration, rotationRate} = e ; let {x,y,z} = acceleration ; let {alpha, beta, gamma} = rotationRate ; console.log(`x,y,z,alpha,beta,gamma=${x},${y},${z},${alpha},${beta},${gamma}`) } //now we use the function subscribe_to_motion('unique_id', handler)
Subscribe to motion events, for example ~>