Press a button
press_buttonSimulate a button press on a robot's push-button sensor to trigger actions like toggling light tracking or stopping all operations.
Instructions
Press a push-button module (a sensor of type "button") for seconds and release it, like a person would. Held ≥ 0.8 s is a long press. The built-in program reacts: short press toggles the head's light tracking (happy face), long press stops everything (driving, autopilot, tracking; pauses the simulation). Returns the press event.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Button sensor id (list_sensors) | |
| seconds | No | How long to hold it (default 0.2 s) |