setPowerMode abstract method

Future<void> setPowerMode(
  1. PowerMode powerMode,
  2. int seconds,
  3. int nanos, {
  4. Map<String, dynamic>? extra,
})

Set the board to the indicated power mode.

// Set the power mode of the board to offline deep for 60 seconds
// Requires importing 'package:viam_sdk/protos/component/board.dart'
const powerMode = PowerMode.POWER_MODE_OFFLINE_DEEP;
await myBoard.setPowerMode(powerMode, 60, 0);

For more information, see Board component.

Implementation

Future<void> setPowerMode(PowerMode powerMode, int seconds, int nanos, {Map<String, dynamic>? extra});