Listing 4.
slow_speed.pl
Home Automation: The X10 Nitty-Gritty
The Perl Journal, Spring 2000
 
#!/usr/bin/perl -w
# USAGE: perl slow_speed.pl [ PORT ]
# same PORT defaults as cm17_bit_toggle.pl

require 'start_port.pl';     # initialization for real ports

use ControlX10::CM17;
use strict;

my $serial_object = open_port (@ARGV);

print "Turning address A1 ON\n";
send_cm17($serial_object, 'A1J');
print "Turning address A2 ON\n";
send_cm17($serial_object, 'A2J');
print "Turning address A3 ON\n";
send_cm17($serial_object, 'A3J');
print "Turning address A4 ON\n";
send_cm17($serial_object, 'A4J');
print "Turning address A5 ON\n";
send_cm17($serial_object, 'A5J');

print "Turning all house A OFF\n";
send_cm17($serial_object, 'AP');

$serial_object->close || die "\nclose problem with port\n";