Just specifying the bits is not sufficient to specify how to send it over IR - because you need to know how long the pulse for 1 vs 0 needs to be.
Gordon's IRReceiver module works for those brands listed, and defines a 1 as something longer than 0.8ms
code += 0|d>0.0008;
Depending on what's receiving it, you may need a different value. The example further down in the tutorial explains hwo to figure that out for an unknown protocol. If you're designing both ends, you can choose whatever value you like, in that general area.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Just specifying the bits is not sufficient to specify how to send it over IR - because you need to know how long the pulse for 1 vs 0 needs to be.
Gordon's IRReceiver module works for those brands listed, and defines a 1 as something longer than 0.8ms
Depending on what's receiving it, you may need a different value. The example further down in the tutorial explains hwo to figure that out for an unknown protocol. If you're designing both ends, you can choose whatever value you like, in that general area.