This fuction creates a PWM out connected to the specified pin, with HIGH PPS mode. You should know that pins under the same timer share the same period.
timer.setPWMOutputPin(pin)
timer: a variable of type Timers_Class .
val: the selected pin number, type int.
This setup fuction serves to turn a LED on and off repeatedly. for difital I/O, the brightness is set to maximum during the "on" phase. (:source lang=c :)
int led_pin = 11; Timers_class led; int setup () {
led.SetPWMOutputPin(led_pin); led.SetPWMFrequency(8); return 0;
} (:sourceend:)
Corrections, suggestions, and new documentation can be added directly to the wiki page. Scroll to the bottom, choose "Edit Page" and use "Papilio" as the password.