run and repeat code until button is pressed with IR remote