[SOLVED]Arduino Leonardo/Yùn 38 kHz carrier

For the benefit of others, it might be useful to post the actual solution that worked for you (i.e. code).