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
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