Represents a physical button.
Readonly
The name of the resource.
Push the button.
const button = new VIAM.ButtonClient(machine, 'my_button');// Push the buttonawait button.push(); Copy
const button = new VIAM.ButtonClient(machine, 'my_button');// Push the buttonawait button.push();
For more information, see Button API.
Send/Receive arbitrary commands to the resource.
The command to execute.
import { Struct } from '@viamrobotics/sdk';const result = await resource.doCommand( Struct.fromJson({ myCommand: { key: 'value' }, })); Copy
import { Struct } from '@viamrobotics/sdk';const result = await resource.doCommand( Struct.fromJson({ myCommand: { key: 'value' }, }));
Represents a physical button.