[Message Prev][Message
Next][Thread Prev][Thread Next][Message
Index][Thread Index]
Re: Is xPL the ideal work-around? Need to access the LPT port from
Mister House...
- Subject: Re: Is xPL the ideal work-around? Need to access the
LPT port from Mister House...
- From: "Jack Edin" <jack@xxxxxxxxxxxxxxxxxx>
- Date: Sun, 23 Oct 2005 21:35:12 -0000
--- In ukha_xpl@xxxxxxx, "John B" <home-automation@j...>
wrote:
>
> Hi Jack,
>
> OK, I've found some sample code in C# for writing bytes out to the
> parallel port, which should do just fine.
Google Rules!
> So, I'd like to suggest a new app:
> "xPL I/O".
Catchy name!
> This will be a Windows service that will be able to write bytes out
> to the parallel port (and maybe also other ports over time, hence
> the reason for the generic name).
At this time, output only is fine. For the future, it would also be
nice to read back from this port.
> Bytes would be written using an xpl-cmnd message like:
>
> Control.basic
> {
> Device=888 (decimal address of LPT1)
> Type=byte
> Current=255
> }
And thw constant "current" can be a variable, right?
> In the above example, we are sending 255 to LPT1 (i.e. make all data
> lines high).
I'm a Hex-man, never liked decimal for hardware. In fact Binary might
be best for this usage - see the bits!
> Let me know if this is the sort of thing you're after
Sure sounds like it is...!!
(I'm excited!)
> and I'll get it done.
>
> Regards,
>
> John
Git 'R Done!!
The device I will be using takes a simple 1 byte input, and sets some
relays ON (where a 1 bit) and sets some relays OFF (when bit=0.)
So I need a table like this:
Speaker1=#00000001
Speaker2=#00000010
Speaker3=#00000100
Speaker4=#00001000
Speaker5=#00010000
Speaker6=#00100000
Speaker7=#01000000
Speaker8=#10000000
Then it would be necessary to do a boolean AND with all the room
names, to create the final byte to put out the LPT port.
So Speaker1 AND Speaker8=#10000001
Within Mister House they have a funcyion called pa_control.pl and it
is used to direct audio to different Rooms.
Steve Switzer wrote a xPL_pa_control.pl which does his bidding the
xPL way!
This could be modified to work it MY way.
His is for a Serial device, where mine is parallel...
I can make the above files available, if it'll help. They're written
in Perl.
Halloween is soon, and the first use of this is for spookin kids...
Thankx,
Jack
:)
xPL Main Index |
xPL Thread Index |
xPL Home |
Archives Home
|