chest_keyboard


Overview

The chest_keyboard example is a Raya application that displays a prompt on the chest screen asking for the user’s name. A virtual keyboard appears, allowing the user to input their response. If the user does not respond within 10 seconds, a timeout occurs, triggering a callout event.

Execution

To execute the example, use the following command:

python3 chest_keyboard/ --auto-run

This will start the game component on the chest display and wait for user interaction.

Behavior

  • The chest screen prompts the user with the message: “What’s your name?”

  • A virtual keyboard is displayed, enabling the user to enter their name.

  • The application waits for the user’s input:
    • If the user enters their name and submits it, the result is logged.

    • If no input is received within 10 seconds, a timeout event is triggered, logging a timeout response.

Inputs

  • No user input is required to execute the script.

  • The user types their name and submits it with the chest display.

Outputs

  • The chest screen displays the keyboard interface.

  • A timeout event is logged if no input is received within the time limit.

  • Final result of the input process

Example Output

When the script is running, the following game will appear on the robot’s chest display:

Output displayed on the robot's chest screen

During execution, the output logs may resemble:

[INFO] [timestamp] [pyraya.chest_keyboard]: Auto running the app
[INFO] [timestamp] [pyraya.chest_keyboard]: Error code:0
[INFO] [timestamp] [pyraya.chest_keyboard]: Error msg:
[INFO] [timestamp] [pyraya.chest_keyboard]: Result data:{"action":"button_clicked","value":"name","id":<id>,"callback_type":"response","stamp":<timestamp>}