Table des matières

TNY-360 Documentation

API Reference

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!


API Structure

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.

Generating schema ...
flowchart TD
    Module[Module]
    Action1[Action 1]
    Action2[Action 2]
    Action3[Action 3]
    Module --> Action1
    Module --> Action2
    Module --> Action3

Using modules and actions in the SDKs

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:

javascript
robot.motor.setVelocity(...);
python
robot.motor.set_velocity(...);
C++
robot.motor.set_velocity(...);

Overview

The TNY-360 API has quite a few modules. Here's a complete list of the modules :

ModuleDescription
SystemSystem-level actions, such as rebooting the robot, getting basic status info, etc.
ProtocolActions related to the network protocol, such as data stream frequency, etc.
GaitGait control actions, such as setting gait type, frequency, etc.
BodyBody related actions, such as setting body velocity or posture.
LegLeg control actions, such as setting leg positions, enabling or disabling the legs, etc.
JointJoint control actions, such as setting joint angles, getting joint states, etc.
MotorMotor control actions, such as triggering motor calibration, sending raw duty cycles, etc.
ImuIMU related actions, such as getting the current orientation or acceleration of the robot.
LaserLaser related actions, such as getting the distance to a front object.
PowerPower management actions, such as getting battery status or controlling power consumption.
FaceFacial expression actions, such as displaying emotions or animations on the robot's face.
CameraCamera control actions, such as capturing images, settings resolution and frame rate.
SpeakerAudio playback actions, such as playing sounds or music.
MicrophoneAudio recording actions, such as capturing audio or adjusting recording settings.
I2CI2C communication actions, such as reading from or writing to I2C devices.
ADCADC (Analog-to-Digital Conversion) actions, such as reading analog sensor values.
Wi-FiWi-Fi network actions, such as connecting to a network or retrieving network information.
BluetoothBluetooth communication actions, such as pairing with devices or transferring data.
LEDLED control actions, such as setting LED colors or brightness.
ErrorError handling actions, such as retrieving error codes or clearing errors.
DiagnosticDiagnostic actions, such as running system checks