Is it possible to control the 3 legs of an RGB LED using 3 of a Core’s digital pins? If it is doable, would it be harmful to the device or LED?
(Yes, I am amateur!)
Oh, and I ask because alllll the examples I look at use Analog pins.
Thanks!
EDIT:
Oh, I think I know the answer. It is doable but since digital pins only allow High and Low, I can’t really produce too many different colors. So, it is better to Analog.
If this is correct, is there a problem to control ‘regular’ red LEDs with digital pins?
And if you are desperate you could even use the non-PWM pins.
While the PWM pins are the obvious and easiest choice (just do an analogWrite(D0, 123); for it) you would have to do your own soft-PWM by doing digitalWrite(D7, HIGH); and digitalWrite(D7, LOW); in very quick succession.
This approach is used for example in the RGBmatrixPanel library.