PDA

View Full Version : LUA irDA help



sebbe
March 30th, 2007, 15:45
can someone help me make a script in lua that read from the ir port on the psp and writes it to a file or something? i need this to record som remotecontrolls ir codes to then make a ir code file to use with irshell. i have tried to make a file, but it crashes at start up, so if anyone could help me find the problem or tell me if this actualy would work then i would be happy:thumbup:
here is the file i have tried to make, dont lough cous i am a bit noob with this stuff:p

-- iR Reader
System.irdaInit()
white = color.new(255, 255, 255)
pad = controls.read
screen:clear
screen: print (5, 5, "press x to record", white)
screen:flip()

command = System.irdaRead ()
if pad:cross then System.irdaRead
screen: print.len(command)
end
timeout = 1
end
screen:flip()
where i wrote screen: print, it is not suppose to be a space, but i had to put one in becouse if i didnt it would show this screen:print

splodger15
March 30th, 2007, 19:13
No Offense but you wont learn anything form someone else doing the code for you.

sebbe
March 30th, 2007, 22:17
i didnt mean that anyone should make it for me, just if someone could help me make the script start, and if someone could look at it and see if it could work the way it is now, with just some modification

dangee
April 4th, 2007, 14:23
this OK
to find a way to store
iRdStr see attachment
IRPEKA.TXT can be INDEX.LUA

note: some config of LuaPlayer/TIFF eloader fail to load InetModules at startup & dont provide ir functions

jak66
April 4th, 2007, 20:48
no offence, but if it was possible to make a pronto hex code recorder/capturer/whatever for psp, don't you think it would have been done ages ago, like when ir shell was still only ir commander

sebbe
April 6th, 2007, 19:57
i dondt see why this can be such hard to do, it is possible to read the signals from the ir port on the psp right? so why should it be so hard to record it, even programable remote controlls can record ir signals and save them and then play it.