[↑]
SmileBASIC4 Replica Reference
TCROBOT
Get recognition information of Toy-Con Robot

TCROBOT ControllerID OUT RecognitionFlag,LimbInformationArray[,Pitch,Roll,Yaw]

・An error occurs if XCTRLSTYLE is used without starting Toy-Con Robot recognition.

Argument

ControllerID

ID of the controller that acquires information: 1 to 2

Return Value

RecognitionFlag

Return a bit value indicating whether each slot of the Toy-Con Robot is recognized

・Recognizing each bit 1 but not 0.

bit0 Right Foot
bit1 Right Hand
bit2 Left Hand
bit3 Left Foot

LimbInformationArray

Return a 2D numeric array containing information for each slot

The meaning of Y and X when the array element is [Y, X] is as follows

Y=0 Right Foot
1 Right Hand
2 Left Hand
3 Left Foot
X=0 Corrected Detection Value: 0 to 1
1 Detection Value Before Correction: 0 to 320
2 Min Correction Value: 0 to 320
3 Max Correction Value: 0 to 320
4 Corresponding Cluster ID

Pitch,Roll,Yaw

Posture angle information with the Toy-Con Robot

・The unit of angle is radian.

Pitch Tilt back and forth. If Toy-Con is tilted to the back, it is positive (value increases)
Roll Tilt left and right. If Toy-Con is tilted to the left, it is positive
Yaw Hip rotation. Rotate counterclockwise to make positive
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
|