FreeBSD and controlling an alarm via relay
Achilleas Mantzios
achill at matrix.gatewaynet.com
Wed Jul 6 08:24:41 UTC 2011
thanx! very interesting!
Στις Tuesday 05 July 2011 20:43:10 γράψατε:
> Why not use the parallel port? Have one of its pins drive a relay. You may need to put a transistor in front of the relay.
>
> Software:
> http://excamera.com/articles/21/parallel.html
>
> Hardware:
> http://www.dakeng.com/relay.htm
>
> Fancy hardware:
> http://www.electronickits.com/kit/complete/elec/ck1601.htm
>
> Tim
>
> On Jul 5, 2011, at 9:30 AM, Achilleas Mantzios wrote:
>
> > Στις Tuesday 05 July 2011 16:10:59 γράψατε:
> >> On Mon, 4 Jul 2011, Achilleas Mantzios wrote:
> >>
> >> [snip]
> >>
> >>> I was thinking of some relay board (instead of the old modem),
> >>> possibly ethernet controlled
> >>
> >> This box has relays and GPIO available via ethernet. It's probably
> >> overkill for your application, but it's well made and easy to use:
> >>
> >> http://www.extron.com/product/product.aspx?id=ipltcr48&s=0
> >>
> >
> > That is too big for my application, thanx anyway.
> > Most probably i'll go for something cheaper like this one
> > http://www.ebay.co.uk/itm/USB-Eight-Channel-Relay-Board-RS232-Serial-Controlled-/110710346488?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item19c6d9d2f8
> >
> > Could i use the ucom driver to talk to the USB device like a normal serial device, via /dev/cua*** ?
> > The above link says one needs to talk to the relay with:
> > 8 Data, 1 Stop, No Parity,Baud rate : 9600
> > and the commands look like:
> > FF 01 00 (HEX)
> > or
> > 255 1 0 (DEC)
> >
> > could i be able to specify those over ucom?
> > do you know any application, perl library, utility or just a guide for standard C serial port programming?
> >
> > i have used mgetty/vgetty in the past to control some modems.
> > I do not know if there any fancier methods to access the serial port, but this is how i used to do it, back in 7.*
> > /usr/local/bin/vm shell -l cuad1 -S onhook_offhook.pl
> > where onhook_offhook.pl reads like:
> > #!/usr/bin/perl
> > #
> > use Modem::Vgetty;
> >
> > my $v = new Modem::Vgetty;
> >
> > $v->device('DIALUP_LINE');
> > $v->send("ATH1");
> > sleep(5);
> > $v->send("ATH0");
> >
> > if i could speak directly with e.g. "255 1 0" like
> > $v->send("255 1 0");
> > that would be awesome...
> > i guess i will have to try it out.
> >> I'd also look at manufactureres such as Moxa and LANtronics.
> >>
> >
> >
> >
> > --
> > Achilleas Mantzios
> > _______________________________________________
> > freebsd-multimedia at freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-multimedia
> > To unsubscribe, send any mail to "freebsd-multimedia-unsubscribe at freebsd.org"
>
>
--
Achilleas Mantzios
More information about the freebsd-multimedia
mailing list