pwm method
override
Get the duty cycle of the given pin of a board.
// Get the PWM duty cycle of pin 15
var dutyCycle = await myBoard.pwm('15');
For more information, see Board component.
Implementation
@override
Future<double> pwm(String pin, {Map<String, dynamic>? extra}) async {
final request = PWMRequest()
..name = name
..pin = pin
..extra = extra?.toStruct() ?? Struct();
final response = await client.pWM(request);
return response.dutyCyclePct;
}