LED intensity on Pyboard D

The official PYBD running MicroPython, and its accessories.
Target audience: Users with a PYBD
Post Reply
nherriot
Posts: 24
Joined: Wed Oct 19, 2016 1:02 pm

LED intensity on Pyboard D

Post by nherriot » Thu Jul 25, 2019 4:18 pm

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

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: LED intensity on Pyboard D

Post by jimmo » Mon Jul 29, 2019 2:56 am

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.

Post Reply