Infrared modulation based on ARM to control devices