#!/usr/bin/perl

$t=1;
$s=127;
$t_s= -1;

$t_str = sprintf("echo -n -e \"\\%o\" > /dev/pwm0",$t);
$s_str = sprintf("echo -n -e \"\\%o\" > /dev/pwm1",$s);
system($t_str);  # drives pwm
system($s_str);  # drives pwm

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

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