A gRPC-web client for the Sensor component.
Readonly
The name of the resource.
Send/Receive arbitrary commands to the resource.
The command to execute.
const result = await resource.doCommand({ name: 'myCommand', args: { key: 'value' },}); Copy
const result = await resource.doCommand({ name: 'myCommand', args: { key: 'value' },});
Return the readings of a sensor.
const sensor = new VIAM.SensorClient(machine, 'my_sensor');// Get the readings of a sensor.const readings = await sensor.getReadings(); Copy
const sensor = new VIAM.SensorClient(machine, 'my_sensor');// Get the readings of a sensor.const readings = await sensor.getReadings();
A gRPC-web client for the Sensor component.