pwm abstract method

Future<double> pwm(
  1. String pin, {
  2. Map<String, dynamic>? extra,
})

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

Future<double> pwm(String pin, {Map<String, dynamic>? extra});