setPwm method
override
Set the duty cycle of the given pin of a board.
// Set the PWM duty cycle of pin 13
await myBoard.setPwm('13', 0.6);
For more information, see Board component.
Implementation
@override
Future<void> setPwm(String pin, double dutyCyclePct, {Map<String, dynamic>? extra}) async {
final request = SetPWMRequest()
..name = name
..pin = pin
..dutyCyclePct = dutyCyclePct
..extra = extra?.toStruct() ?? Struct();
await client.setPWM(request);
}