Is there an example on using the Gyro object somewhere? Mainly looking to get step count value at this stage.
Is there an example on using the Gyro object somewhere? Mainly looking to get step count value at this stage.
Hi @alanstones,
please see the attached sample project.
Steps:
6. Run the project in the Creo simulator
Another way is to use the Gyro value programmatically, the new values are Map objects, please see the NewValue
event of the Gyro object:
var pedometerData = value["pedometerData"] var numberOfSteps = pedometerData["numberOfSteps"] Console.write("Numbero of Steps: \(numberOfSteps)")
That's a great help, thanks.