Page 1 of 1

LED intensity on Pyboard D

Posted: Thu Jul 25, 2019 4:18 pm
by nherriot
Hi Micropython Folks,

just a quick question. I've tried using the '.intensity(<value>) method on the LED lights on the pyboard d.
The intensity method does not seem to have any effect on brightness, except really to have it switch off or on as in:

Code: Select all

>>> LED(3).intensity(0)
will switch my 'Blue' LED off.

Is it designed this way?

Kind regards, Nicholas

Re: LED intensity on Pyboard D

Posted: Mon Jul 29, 2019 2:56 am
by jimmo
Hi,

Unfortunately PWM is not supported for the onload LEDs on the PYBD. The comment in http://docs.micropython.org/en/latest/l ... b.LED.html about it being enabled for LED3 and LED4 should say that it's specific to PYBv1.x

It looks like the LED pins (machine.Pin.board.LED_RED, etc -- PF3, PF4, PF5) don't have timers available as alternate functions, so unfortunately you can't manually enable PWM on these pins using pyb.Timer / TimerChannel.