#!/usr/bin/perl

$t=1;
$s=127;
$d= 64; # The size of the steps. 

for($x=0;$x<5;$x++){

  for($t=1;$t<128;$t+=$d){
    $t_str = sprintf("echo -n -e \"\\%o\" > /dev/pwm0",$t);
    system($t_str);  # drives pwm
  }
 
  for($t=128;$t<256;$t+=$d){
    $s_str = sprintf("echo -n -e \"\\%o\" > /dev/pwm1",$s);
    system($s_str);  # drives pwm
  }
}
