Name

set()

Class

PWM

Description

Enables the PWM output

When no period is specified, a default 1 kHz (1000 Hz) is used.

Examples

  • 
    

Syntax

  • .set(period, duty)

Parameters

  • period(int)cycle period in Hz
  • duty(float)duty cycle, 0.0 (always off) to 1.0 (always on)

Return

  • void