ht_pwm_width()


Changing designated Hardware Timer's PWM signal

Description

void ht_pwm_width(int $ht_id, int $width, int $period)

Parameters

Return Value

none

Example

<?php
include "/lib/sd_340.php";
ht_pwm_setup(0, 1, 100);      // Changing HT0 as period 100us with 1% duty PWM
for($i = 0; $i < 99; $i++)
{
  ht_pwm_width(0, 1+$i, 100); // increasing duty cycle by 1%
}
?>

See also