The IR page you linked also mentions a whole bunch of other stuff you need - specifically analogWrite on the other pin the IR LED is connected to.
There are a few posts on the ESP8266 forum about this already, but basically the code given won't work on ESP8266 because there's no way of getting a 40kHz square wave at the same time as executing digitalPulse.
The solutions for you would be to:
Use a proper Espruino device.
Set up a 555 timer to give you a 40kHz signal as well.
Build a new array that contained a series of 40kHz pulses, instead of your current ~1-2ms pulses - see the attached image from eevblog
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.
The IR page you linked also mentions a whole bunch of other stuff you need - specifically
analogWrite
on the other pin the IR LED is connected to.There are a few posts on the ESP8266 forum about this already, but basically the code given won't work on ESP8266 because there's no way of getting a 40kHz square wave at the same time as executing digitalPulse.
The solutions for you would be to:
1 Attachment