Game to Real world IR trigger

Is there a way for an event in game to trigger a IR signal to be transmitted from the computer out to something?

Arduino would be the way, there is a plugin for that