[squeak-dev] How to call irsend

Louis LaBrunda Lou at Keystone-Software.com
Wed Feb 6 15:20:26 UTC 2013


Hi Tim,

>Now you just owe us an explanation of what you're getting up to with your Pi; irsend sounds like maybe doing an IR remote control thingy? Nosy buggers need to know...

Glad you asked.  I know, you know a lot of what I'm about to say here but
it may help other Nosy buggers.

I have a very old Windows 2000 computer (I call it the TV computer, it is
cobble together from old parts, one of which came from a neighbor kid who
bent the CPU pins pulling it out to upgrade the motherboard and CPU) that I
use to record some TV shows in the evening.  It is (and has to be)
connected to a cable box.  To record different channels as the night goes
on, the cable box channel needs to be changed at the right time.  This
tried to do this from the TV computer but it is too old and slow to record
and change the channels reliably at the same time.  Enter the Raspberry Pi
http://www.raspberrypi.org/.

I use an IR transmitter I got from Iguanaworks http://iguanaworks.net and
LIRC http://www.lirc.org/ (there is also a Windows version at
http://winlirc.sourceforge.net/) to send it commands to change the channel.
I was using the Iguana from an other Windows computer but that is a lot of
horsepower just to change the channels.

I use Raspbian (http://www.raspbian.org/ a Debian version of Linux) because
I felt it would be easier to run Squeak and the LIRC code.  I wrote a class
to hold the IguanaIR/LIRC info to change the channel at a given time and
reschedule for another day.  It considers things like the individual
weekdays and all weekdays.

LIRC has a command called irsend that (after some set up) can send a
request to the IguanaIR to send some IR codes, like change the channel.
Dave's "OSProcess command:" works great to run the irsend command with data
from my class to change the channel.

I plan to write code in a workspace that will instantiate this class for
each time I need to change the channel during the week.  These instances
will be put in a collection that is run through every second or so to see
if it is time to change the channel.  I expect to start Squeak on the
RasPi, load the workspace, start it up and leave it running.  At least
until I want to play with the RasPi for something else.

Lou
-----------------------------------------------------------
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:Lou at Keystone-Software.com http://www.Keystone-Software.com



More information about the Squeak-dev mailing list