Brightness of on-board LED.
-
Is there any way to set the brightness level of the LED? It has burned holes in my retinas!
-
@jmarcelino Thank you for noting the issue and acting on it.
-
@alidaf
The onboard LED is being driven by an hardware accelerated peripheral, the RMT, so it is already overkill :)https://github.com/pycom/pycom-micropython-sigfox/blob/master/esp32/mods/modled.c
I think this can be can improved, I'll move it to Enhancements section. Thanks for the suggestion.
-
@this-wiederkehr The problem is in getting colours that are not primary. The ratio of R:G:B should be the same in order to get an effective difference in brightness for the same tone. Usually brightness levels are set by changing the PWM timing.
Your idea is a good workaround for now.
-
@alidaf: I'd say the brightness is different...
See the difference between e.g.:
pycom.rgbled(0x000010)
to
pycom.rgbled(0x0000ff)
they are the same tone (clear blue or you name it) but clearly brightness is different, not? Or how'd you call the difference?
-
@this-wiederkehr I did some work on an RGB LED strip a while ago and the RGB values didn't really affect the brightness, just the tone. We could really do with the equivalent of the FastLED Arduino library although that's a bit overkill for the on-board LED!
-
@alidaf
he he :)
-
@livius Bubblegum fixes everything!
-
https://docs.pycom.io/chapter/firmwareapi/pycom/pycom.html
you can switch heartbeat of:
pycom.heartbeat(False)
If you want to light the LED according to your own schema you can adjust the brightness of the individual colors (red, green, blue) by setting the respective hex value.
'pycom.rgbled(color)'e.g. pycom.rgbled(0x000002) is weak blue.
Edit: There is no way to adjusting the brightness of pycom module signals when booting or of the heartbeat unless building your own firmware.
-
@alidaf said in Brightness of on-board LED.:
Is there any way to set the brightness level of the LED? It has burned holes in my retinas!
put label on it ;-)