Switch to intermitently turn on?

Hey all,

I am setting up an esp8266 that controls power to a led light.
I’ve successfully set up the switch so it can be controlled from HA, but I have a couple of problems:

  • I’ve connected the led light to D6 (GPIO13), hoping that it would output 5V, but I tested with a multimeter and it only delivers 1.8V - is this expected? is there a way I can make this better?

  • I’d be happy with the light being dimmer, as long as it doesn’t flicker to the naked eye - which is what happens now (I’m guessing because the esp8266 cannot deliver as much power as the led light requests). So I’m thinking of implementing a switch that, when it is on, then it puts voltage on GPIO13 on and off every 20ms or so - would this be feasible to be implemented on the yaml? and if so, how?

Thanks!

No. The output voltage for ESP GPIOs is 3.3v. If you are only getting 1.8v you are either not using a current limiting resistor (you should) or you are drawing too much power from the GPIO. There is something wrong here. Which LED light are you using?

Dimming can be accomplished using PWM (pulse width modulation) at a frequency too fast for the eye to see.

Are you using ESPHome for this?

If so see: Monochromatic Light — ESPHome