[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Advice Needed
On Wed, 19 Mar 2003, Fraser Farrell wrote:
> Tom Droege wrote:
> >
> > 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.
>
> See www.gphoto.org for the list of ~300 digital cameras and webcams that are
> supported by gPhoto. In general any new camera with a USB outlet will work,
> including "live video" modes. Alternatively I have discovered that many cheap
> generic webcams will work okay with xmovie too. I guess the cheap ones all
> use the same (one or two) chipsets?
Gphoto is by far the best for digital cameras, manly for how much work is
continually done on it. I'm running one of the latest CVS builds here as
it supported remote capture for my EOS-D30 which I occasionally use with
the telescope. I've not yet tried it with the cheap webcam I have on a
windows box yet.
> gPhoto and xmovie are included with most modern Linux distributions. Possibly
> on a supplementary programs disc.
gphoto tends to be part of the main distribution these days. Definitely is
for SuSE & Redhat.
> > 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.
Pipe to the serial port is best. If a different serial speed is required,
try using setserial first (have to be root for this).
> If you're going to write this as a shell script then try using a "sleep 1"
> between each character send. I'm assuming it doesn't matter if it takes 10
> seconds to transmit 10 specific characters to your dome motors?
I've used this technique when piping some commands via telnet. I had one
unix box (ICL based) that when a job failed needed to send a text message
to the operators phone. The script sent the relevent commands to a special
port on a Linux box which had a simple script listening on it. To stop the
remote box sending too much, "sleep 1" did the trick. There's no reason
why it wouldn't work here.
There is aparently a usleep command. Not used or seen it my self, but on
one of the lists I'm on someone wrote about it. Useful if you want <1
second resolution.
> > DOS has a seconds since
> > midnight, does linux have a similar time command?
>
> Linux counts seconds since the Beginning Of The Unix Era - 1970 Jan 1 00:00
> UTC. We're up to about 1.05 billion seconds now. I understand there's going
> to be an arithmetic overflow on this counter sometime in 2038, but even I
> will have upgraded by then :-)
Only for 32bit. 64bit's overflow is some time after the theorised end of
the universe ;-)
Peter
--
Peter Mount
peter@retep.org.uk
http://www.retep.org.uk/
Tel/Fax: +44 (0) 1622 749439
Mobile: +44 (0) 7903 155887
US Fax: 1 435 304 5165
US Voice: 1 435 304 5165