Welcome to the TNY-360 API Reference!
This section goes into the details of the TNY-360 API and how to use it with the different SDKs (Javascript, Python, C/C++, ...) to control your robot and unleash its full potential!
The TNY-360 API is structured in modules, and each module contains a set of actions.
A module represents one of the robot's subsystems, such as the motors, and each action represents a specific command that can be sent to this subsystem, such as setting the velocity of the motors.
Each modules and actions are accessible in the same way accross all the SDKs. For example, to set the velocity of one motor, you would use the motor module and the setVelocity action, like this:
robot.motor.setVelocity(...);
robot.motor.set_velocity(...);
robot.motor.set_velocity(...);
The TNY-360 API has quite a few modules. Here's a complete list of the modules :
| Module | Description |
|---|---|
| System | System-level actions, such as rebooting the robot, getting basic status info, etc. |
| Protocol | Actions related to the network protocol, such as data stream frequency, etc. |
| Gait | Gait control actions, such as setting gait type, frequency, etc. |
| Body | Body related actions, such as setting body velocity or posture. |
| Leg | Leg control actions, such as setting leg positions, enabling or disabling the legs, etc. |
| Joint | Joint control actions, such as setting joint angles, getting joint states, etc. |
| Motor | Motor control actions, such as triggering motor calibration, sending raw duty cycles, etc. |
| Imu | IMU related actions, such as getting the current orientation or acceleration of the robot. |
| Laser | Laser related actions, such as getting the distance to a front object. |
| Power | Power management actions, such as getting battery status or controlling power consumption. |
| Face | Facial expression actions, such as displaying emotions or animations on the robot's face. |
| Camera | Camera control actions, such as capturing images, settings resolution and frame rate. |
| Speaker | Audio playback actions, such as playing sounds or music. |
| Microphone | Audio recording actions, such as capturing audio or adjusting recording settings. |
| I2C | I2C communication actions, such as reading from or writing to I2C devices. |
| ADC | ADC (Analog-to-Digital Conversion) actions, such as reading analog sensor values. |
| Wi-Fi | Wi-Fi network actions, such as connecting to a network or retrieving network information. |
| Bluetooth | Bluetooth communication actions, such as pairing with devices or transferring data. |
| LED | LED control actions, such as setting LED colors or brightness. |
| Error | Error handling actions, such as retrieving error codes or clearing errors. |
| Diagnostic | Diagnostic actions, such as running system checks |