[Tutor] COM Ports

Aaron Mathews ash@zyx.net
Thu, 19 Apr 2001 22:44:30 -0600


Unless you can find a published spec for the communication mode the IR
receiver uses, you will be in for some reverse engineering if you want
full functionality (generally). You might try contacting the
manufacturer of the device and see if they have any developer kits, etc.

You might try watching COM2 from a terminal, and capturing the output
from the IR receiver when you press buttons- you could watch for that
output (per button) and execute a function when you see the command for
'5', for example.

Oh, and I don't know anything about accessing serial ports on windows...
I'm used to just opening the serial device as a filehandle under BSD.
Sorry :)

-Aaron

----- Original Message -----
From: "Timothy M. Brauch" <tbrauch@mindless.com>
To: "Python Tutor" <tutor@python.org>
Sent: Thursday, April 19, 2001 4:39 PM
Subject: [Tutor] COM Ports


> I have a project that I would greatly appreciate some help with
getting
> started.  I think it can be done in Python, and would love it if it
can
> be.
> I have an infrared receiver for a remote control hooked up to my Win98
> computer's COM2.  What I would like to do is be able to use the remote
> to fun functions inside a Python program, depending on what button is
> pushed.  The receiver also can pick up signals from any remote, but
the
> program that came with the remote will only operate with this remote.
I
> would really like to eventually write a program that can be changed
> fairly easily depending on what remote I have on hand (no need to
worry
> about losing the remote).
>
> The problem is I don't know how (or even if it is possible) to use
> Python to "get" the buttons from COM2.  Also, I'm not even sure what
> COM2 sends when I do push a button.
>
> If someone can just point me in the right direction, I would be very
> greatful.  Of course, any other help you might want to provide would
be
> great as well.
>
>  - Tim
>
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>