IR sensor code working