[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Advice Needed




Hey Tom,

Perl/Linux wise, Device::SerialPort is what you want to send 
commands.  This is what I'm using in my MarkIV control program.  So, 
you'd send a character, do a "sleep 1;", repeat until done.  As was 
pointed out, "time" will return the time in seconds since January 
something, 1970, but I don't believe you will need this since you 
don't care about absolute time, do you?  If so, Date::Calc and 
Class::Date are pretty handy.  I use the latter to help calculate the 
seconds until sun rise/set so I know when to stop/start taking 
pictures.

If you have a windows computer up in the dome (or linux for that 
matter), you can use VNC (http://www.uk.research.att.com/vnc/) to 
display the remote terminal on your local computer.  Easiest way I've 
found.  I use this regularly for windows to windows stuff.  For linux 
to linux, I use ssh which can forward X windows stuff to your local 
computer from the remote.

Additionally, if you have windows in the dome, you can install 
ActiveState Perl 
(http://aspn.activestate.com/ASPN/Downloads/ActivePerl/Source), and 
use Win32::SerialPort and do everything you want through windows.  
You can even install Apache easily if you would like to try the web 
server approach to the camera (but I've no idea how to get the web 
cam integrated...).

Cheers,
Rob

Date sent:      	Tue, 18 Mar 2003 18:20:29 +0000
To:             	tass@listserv.wwa.com
From:           	Tom Droege <tdroege2@earthlink.net>
Subject:        	Advice Needed

> Dan and I just went up and awakened TOM2 and TOM3 from their winter
> hibernation in the dome.
> 
> I want to install a camera in the dome, and use the RS232 link to open
> and close it.
> 
> I would like to do all this under linux, but will use Windos and
> QBasice if desperate.
> 
> Here is what I need to be able to do:
> 
> 1) I will put a separate linux machine in the dome.  There is none
> there now.  It will be on the ethrenet.
> 
> 2) I want to install a cheap webcam on this machine.  I want one that
> will just work, otherwise it will be easier to use Windows.  Since
> cameras are so cheap, I am quite willing to buy one that is known to
> work.  This seems to be the easiest approach to using something on
> linux.
> 
> 3) I want to run a simple program on the linux machine which sends
> characters out on the serial port.  Best if I can do this in a  perl
> program.  I need to be able to send the single characters A, a, B, b
> in order to control the two halves of the dome up or down.  Really
> complicated stuff.  It looks like I will need to send about 10 "A"s a
> spaced in time to open one half of the dome and 10 "a"s spaced in time
> to close the dome.  So I need to know a little about time.  I need to
> specify, for example, how long a "send and 'a' a second" loop is to
> run.  I don't need precision time.  But I do need rough knowledge of
> time.  Hmmm!  I guess i can just read Date and parse it to get what I
> want.  DOS has a seconds since midnight, does linux have a similar
> time command?
> 
> 4) I want to be able to sit in my office elsewhere on the ethernet and
> open a window that shows what the camera sees.  Then I want to open a
> terminal and run the program to open and close the dome.  I don't
> trust the mechanics of the dome, so I want to be able to watch it when
> I move it.  Possibly I will want to run more than one camera at a time
> to see what I want to see.  One might be outside looking at the
> weather.
> 
> All this sort of thing is known to work on linux, I just have to learn
> to do it.  So if you all advise me to go ahead, then someone will have
> to lead me by the hand.
> 
> This is, of course, great fun.  Mad scientist at work, and all that. 
> We were able to test that the RS232 control worked to control the dome
> with a QBasic test program.
> 
> Tom Droege
> 
> 
> 
>