Represents a physical sensing device that can provide measurement readings.
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.
Optional
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();
For more information, see Sensor API.
Represents a physical sensing device that can provide measurement readings.