Hello all

I've put in the C glue to use ir on Jive from Lua.

To use it, call /usr/bin/testir from lua with command line arguments.
All arguments are four bytes and in hex notation.

The first argument is the carrier frequency to be used, followed by the
ir command bits. If the carrier should be turned on, set the highest bit
(i.e. 0x80000000).

So for instance 0x80002260 means send a mark (on with carrier) for
8800ms and 0x00001130 means send a space (off) for 4400ms.

Here is a sample lua script that send the arrow down command for a
Squeezebox or Transporter.

Cheers
Felix

-- Carrier frequency - 40000Hz
cmd = "0x00009C40 "
-- Lead bit
cmd = cmd .. "0x80002260 0x00001130 "
-- Command - Squeezebox arrow down
cmd = cmd .. "0x80000226 0x00000226 "
cmd = cmd .. "0x80000226 0x00000659 "
cmd = cmd .. "0x80000226 0x00000659 "
cmd = cmd .. "0x80000226 0x00000659 "
cmd = cmd .. "0x80000226 0x00000226 "
cmd = cmd .. "0x80000226 0x00000659 "
cmd = cmd .. "0x80000226 0x00000659 "
cmd = cmd .. "0x80000226 0x00000226 "
cmd = cmd .. "0x80000226 0x00000659 "
cmd = cmd .. "0x80000226 0x00000226 "
cmd = cmd .. "0x80000226 0x00000226 "
cmd = cmd .. "0x80000226 0x00000226 "
cmd = cmd .. "0x80000226 0x00000659 "
cmd = cmd .. "0x80000226 0x00000226 "
cmd = cmd .. "0x80000226 0x00000226 "
cmd = cmd .. "0x80000226 0x00000659 "
cmd = cmd .. "0x80000226 0x00000659 "
cmd = cmd .. "0x80000226 0x00000226 "
cmd = cmd .. "0x80000226 0x00000659 "
cmd = cmd .. "0x80000226 0x00000659 "
cmd = cmd .. "0x80000226 0x00000226 "
cmd = cmd .. "0x80000226 0x00000226 "
cmd = cmd .. "0x80000226 0x00000226 "
cmd = cmd .. "0x80000226 0x00000226 "
cmd = cmd .. "0x80000226 0x00000226 "
cmd = cmd .. "0x80000226 0x00000659 "
cmd = cmd .. "0x80000226 0x00000226 "
cmd = cmd .. "0x80000226 0x00000226 "
cmd = cmd .. "0x80000226 0x00000659 "
cmd = cmd .. "0x80000226 0x00000659 "
cmd = cmd .. "0x80000226 0x00000659 "
cmd = cmd .. "0x80000226 0x00000659 "
cmd = cmd .. "0x80000226 0x00000226 "
os.execute("/usr/bin/testir " .. cmd)


-- 
fcm4711

Everyone said: This cannot be done. But one day someone came along who
didn't know about this - and did it. (Source unknown)
------------------------------------------------------------------------
fcm4711's Profile: http://forums.slimdevices.com/member.php?userid=42
View this thread: http://forums.slimdevices.com/showthread.php?t=40367

_______________________________________________
jive mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive

Reply via email to