First time playing with an IR sensor.

my bad just reread your code again I'm using my phone with a cracked screen. Have you looked at the data sheet for the ir receiver