### Scan the room by moving the Pan. use IO::Socket; ### Set to match your AbelCam computer info $ip_addr = "192.168.2.30"; $abel_port = "8080"; ### Set to whatever you prefer. $cam = 0; # Cam number $tilt = 0; # Tilt position (-100 to 100) $wait = 3; # Seconds to wait between moves ### Set these too, but be careful. 10 steps of size 4 (or ### 5 steps of size 8, or whatever) is full range of pan ### travel for an Orbit/Sphere camera. $steps = 10; # Number of pan moves before reversing direction $size = 4; # Size of one pan step ### This sub handles the HTTP stuff sub mover { my $EOL="\015\012\015\012"; my $req = lc(shift); my $cmd = "GET /$req HTTP/1.0"; $time=localtime; print "$time\t$cmd\n"; my $remote = IO::Socket::INET->new( Proto => "tcp", PeerAddr => $ip_addr, PeerPort => $abel_port, Timeout => "2" ) or die "\nCan't connect to $ip_addr:$abel_port"; print $remote "$cmd\n"; print $remote "Accept: text/html\n"; print $remote "Connection: close" . $EOL; while (<$remote>) { } } ### Main program starts here... print"\nTalking to $ip_addr on Port $abel_port...\n\n"; mover ("home$cam-0&zoom5=1.0"); sleep(3); mover ("pos$cam--100,$tilt"); sleep(2); while(1) { for ($i=0; $i<$steps; $i++) { sleep($wait); mover("right$cam-$size"); } for ($i=0; $i<$steps; $i++) { sleep($wait); mover("left$cam-$size"); } }
St. Louis, Missouri, USA