#!/usr/bin/perl

$pwmval=$ARGV[0];

if (!($ARGV[0])) {die("must have at least 1 input arg. (the pwm value)")}

$commandstring = sprintf("echo -n -e \"\\%s\" > /dev/pwm0",$pwmval);

print STDOUT "$commandstring\n";
system($commandstring);  # drives pwm

