new Gyro()
Example
mcore.Gyro()
.axis(1)
.getData()
.then((val) => {
console.log(val)
});
Extends
Members
-
protocol
-
getter of protocol
- Inherited From:
Methods
-
axis(axis) → {Instance}
-
Set axis in order to get the coordinates by getData
Parameters:
Name Type Description axis
Number X轴(01) Y轴(02) Z轴(03)
Returns:
Instance -return instance
- Inherited From:
-
async getData() → {Promise}
-
Get data of Gyro sensor
Returns:
Promise- Inherited From: