[↑]
SmileBASIC4 Replica Reference
GYROA
Get the angle of gyroscope

GYROA ControllerID [,SensorID] OUT X,Y,Z

・If the motion sensor is not enabled in XCTRLSTYLE, 0 will be returned to all.
・If you move the controller violently or continue to use it for a long time, errors will accumulate and the correct value will not be returned. So, it is necessary to reset the angle by calling the GYROSYNC command at the required timing.

Arguments

ControllerID

ID of the controller you want to check: 1 to 4

・ControllerID 0 cannot be specified.
・For details on the controller ID, refer to the help for the CONTROLLER function.

SensorID

ID of sensor to check: 0 to 1

・ID 1 is valid only when dual-controller grip is used.
・0, if not specified.

Return value

X, Y, Z

Gyroscope angle around each axis

・The unit is radian.
・X is pitch.
・Y is a roll.
・Z is yaw.
・The direction in which the right screw rotates in each positive direction is a positive value.

About this site
Our site is an unofficial manual site of programming software "SmileBASIC" for NintendoSwitch™.
I acquire the content of the site from the official reference site of the SmileBoom Co.Ltd. that is the development and sales cause of the software in real time (a minimum period of 24 hours update) and display it. For automatic update, contents may become improper.
Please confirm the correct content in an official site.

June 3, 2020
by mim
OK
|