• Hi stephaneAG and Gordon!

    I've became very interested in both of your approaches. I've studied a little about IR Transmission and found those great resources:

    http://www.ece.ucsb.edu/Faculty/rodwell/Classes/ece2c/labs/Lab4_2C_2009.pdf

    http://www.ti.com/lit/an/slaa644b/slaa644b.pdf

    http://www.remotecentral.com/features/irdisp3.htm

    http://forum.espruino.com/conversations/297428/

    I don't know how, yet, but I've managed to output 38kHz wave using

    analogWrite(D13, 1, {freq: 38000});
    

    on my Wemos D1 Mini.

    Using the IRReceiver module, I could even see the binary data printed on the console terminal.

    I was wondering if it's possible to implement only one port to create an IR transmitter. I've already soldered a prototype PCB with a TIP 122 and 4 IR LEDs in parallel (nothing serious, that I can't add another transistor later), but for the sake of the high optimization (I intend to get better each day with Javascript), I will continue with the quest of only using one uC port.

    By reading those resources above, I found that the IR Transmission protocol that I'm implementing (or trying to do reverse engineering...) uses ASK Modulation, by the variation of the "on" pulse width to differentiate between zeros and ones.

    So, a "ON" signal must have 48x 38kHz pulses and 24x off pulses (which I can just extend the 48º time length to cover that area, saving array space) and an "OFF" signal must have 24x 38kHz pulses and another 24x off pulses (which again I can extend the time duration of the 24º pulse, so I can save space on the array)

    I've tried to do this, but got "Out of memory" limitations. I'll try to use your examples here to try to create an array "on the go" or iterate through lots of "digitalPulse" calls, in a for loop, so I don't need to use arrays.

    Thanks a lot for your colaboration!

    EDIT: Finished paragraph.

    EDIT2: Changed the mistyped "380000" to "38000" in code snippet.

About