#! /usr/bin/perl

use strict;
use warnings;
use Quancom;
use Data::Dumper;
# use blib;

MAIN: {
    my $q = new Quancom $ARGV[0];

    my $r;

    # switch on/off all lights on the first relais
    $r = $q->cmd("WB0100FF");
    print $r->ok ? $r->data : $r->error, "\n";

    sleep 1;
    $r = $q->cmd("WB010000");
    print $r->ok ? $r->data : $r->error, "\n";

    sleep 1;
    $r = $q->cmd("WB010001");	# 1 bit setzen
    print $r->ok ? $r->data : $r->error, "\n";
}

