The start value will depend on which way you put the IR transmitter between the 2 pins :)
It might also be handy to make the duty cycle 0.9 as in the example now you're pulling down to turn on. It means the LED is then only on for 10% of the time - which means you can use lower resistor values to drive it with more power without risking breaking it. Also I think it's closer to what the IR receivers expect.
But hey, if it's working :) Also, for turning off, just try digitalRead(A5) - it'll put the pin into an input state
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.
Isn't the right frequency 38000 Hz?
As @ClearMemory041063 said there's some example code at http://www.espruino.com/Pico+Infrared
The start value will depend on which way you put the IR transmitter between the 2 pins :)
It might also be handy to make the duty cycle 0.9 as in the example now you're pulling down to turn on. It means the LED is then only on for 10% of the time - which means you can use lower resistor values to drive it with more power without risking breaking it. Also I think it's closer to what the IR receivers expect.
But hey, if it's working :) Also, for turning off, just try
digitalRead(A5)
- it'll put the pin into an input state