
print "motor.pl go\n";


$mpos = 0;

$phase=0;

sub motordown {
  $phase = ($phase+1)%4;
  setmotor();
  $mpos++;
}
sub motorup {
  $phase = ($phase-1)%4;
  setmotor();
  $mpos--;
}

$down=shift;
$on = shift;

sub setmotor {
  action("s".($phase+1));
}
