I want to get gyroscope sensor values
By ahjin lee
17 Sep 2020 19:56
English
3 Replies
X: <div id="gyroX"></div>
Y: <div id="gyroY"></div>
Z: <div id="gyroZ"></div>
var gyroscopeSensor = tizen.sensorservice.getDefaultSensor("GYROSCOPE");
function onGetSuccessCB(sensorData) {
document.getElementById("gyroX").innerHTML = sensorData.x;
document.getElementById("gyroY").innerHTML = sensorData.y;
document.getElementById("gyroZ").innerHTML = sensorData.z;
}
function onsuccessCB() {
gyroscopeSensor.getGyroscopeSensorData(onGetSuccessCB);
}
gyroscopeSensor.start(onsuccessCB);
The x, y and z are fixed at 1 or -1, not change.
Edited by: ahjin lee on 17 Sep, 2020
You must log in to use this service. Log in now?
The tag you entered already exists.
Do you want to report this post as spam?
The post has been reported as spam.
cannot be empty.
Are you sure you want to cancel and return to the list?
The code has been copied to the clipboard.
Enter a title.
All Categories
General Support
Tizen .NET
Web Application Development
Native Application Development
SDK & IDE
--------
--------