Hardware PWM (analogWrite) will reduce the power used by the LEDs, but it requires the high speed oscillator to stay on, which means the Pico will still be drawing 11mA. (setDeepSleep will stop the PWM)
Software PWM (analogWrite(pin,val,{ freq : 25, forceSoft : true })) will work with setDeepSleep(1) so strangely should actually draw less power on average - but ideally you want the frequency as low as possible to get the best out of it. You'll also be drawing more power the more outputs you're doing that on.
Using the pullups as above - it's by far the best, but will probably be really dim.
I'm not quite sure what you meant about the potentiometer? If the LEDs all share a common line then you could put that on a potentiometer (or could do a similar thing with a resistor and the Pico) - the brightness would change depending on how many LEDs were on, but it would save a lot of power.
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.
Ok, so you've got a few options really:
setDeepSleep
will stop the PWM)analogWrite(pin,val,{ freq : 25, forceSoft : true })
) will work withsetDeepSleep(1)
so strangely should actually draw less power on average - but ideally you want the frequency as low as possible to get the best out of it. You'll also be drawing more power the more outputs you're doing that on.I'm not quite sure what you meant about the potentiometer? If the LEDs all share a common line then you could put that on a potentiometer (or could do a similar thing with a resistor and the Pico) - the brightness would change depending on how many LEDs were on, but it would save a lot of power.