That's a hard one - you'd have to test - I think it'll depend on the brightness. analogWrite(LED1,0.99) will certainly use more power than digitalWrite(LED1,1).
There is hardware PWM, but it requires the high-speed oscillator to be on - which will use power even though the processor is asleep.
If you want a dim glow, by far the most power efficient way would be doing pinMode(LED1,"input_pullup") since then everything can be properly asleep.
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.
That's a hard one - you'd have to test - I think it'll depend on the brightness.
analogWrite(LED1,0.99)
will certainly use more power thandigitalWrite(LED1,1)
.There is hardware PWM, but it requires the high-speed oscillator to be on - which will use power even though the processor is asleep.
If you want a dim glow, by far the most power efficient way would be doing
pinMode(LED1,"input_pullup")
since then everything can be properly asleep.