Hi ,
I would like to know how to access the bearing data of the compass in javascript.
I found the acceleration, the three axis of the compass and the magnetic field, but not the bearing of the compass .
Would you have an example in javascript?mparadis wrote:You'll have to calculate bearing manually. See this page in our documentation for more information.
Code: Select all
from Phidget22.Phidget import *
from Phidget22.Devices.Spatial import *
ch = Spatial()
ch.openWaitForAttachment(1000)
eulerAngles = ch.getEulerAngles()
print("EulerAngles: " + str(eulerAngles))
ch.close()
Users browsing this forum: No registered users and 0 guests