-->
Page 1 of 1

[SOLVED] D1 mini Built-In LED Brightness Control

PostPosted: Mon Nov 07, 2022 4:44 am
by beic
Hi there,

As the title already mentions, my question is, could be the Built-In LED Brightness controlled on D1 mini board?
If yes, how?

Thank you for the answers and suggestions,

Kind regards,
Viktor

Re: D1 mini Built-In LED Brightness Control

PostPosted: Mon Nov 07, 2022 7:55 am
by rooppoorali
It's possible to fade the built-in LED of Wimos D1. https://github.com/wemos/D1_mini_Exampl ... e/Fade.ino

Re: D1 mini Built-In LED Brightness Control

PostPosted: Mon Nov 07, 2022 8:21 am
by QuickFix
Half the brightness:
Code: Select allvoid setup() {
  pinMode(LED_BUILTIN, OUTPUT); // <==== LED_BUILTIN should be set automatically to GPIO2 when the correct board is selected
  analogWrite(LED_BUILTIN, 127); // <==== change the second value [0...255] to set the brightness
}

Re: [SOLVED] D1 mini Built-In LED Brightness Control

PostPosted: Mon Nov 07, 2022 11:45 am
by beic
Thank you to all for the help, It worked! ;)