• Susbcribe to orientation events

    let handler = function(e :any) { 
    let {alpha, beta, gamma} = e ;
    console.log(`alpha,beta,gamma=${alpha},${beta},${gamma}`)
    }

    //now use the function
    subscribe_to_orientation('unique_id' , handler )

    Parameters

    • id: string
    • handler: ((e: any) => any)
        • (e): any
        • Parameters

          • e: any

          Returns any

    Returns void