0
votes

In the NodeMCU doc, it appears PWM on a pin may be set one of two ways, either through PWM or GPIO.

In the PWM doc it says that if you set PWM on one pin for a certain frequency then that frequency is set for all other pins using PWM. This means that you don't have RGB but rather 50 shades of grey.

The GPIO section does not mention this limitation. Is it on place? Is there only one timer on the chip itself available for PWM?

1
You seem to be referring to pwm.setclock(). I linked the docs in your description.Marcel Stör

1 Answers

2
votes

You seem to be confusing the effects of Frequency and Duty cycle on an RGB led, you will have 3 pins connected on which you generate a PWM, where you can set the duty cycle to change the intensity, whether all those frequencies are the same or not doesn't matter.