Hi there!
I need to implement a small-footprint visual feedback solution, an RGB LED that should be able to produce a handful of colors - including orange. So it's necessary to be able to drive the channels at least at one intermediate brightness. The PWM outputs are already used for more important things, while NeoPixels and softPWM are overkills for my goal with considerable penalty on RAM&flash. Combining 2 digital pins to a 2-bit output would do the job, but I don't know if it's safe with simple resistors? AFAIK switching a pin to input causes it to almost float instead of sinking, maybe this could be used as the de-facto LOW, but I'm afraid a software bug could leave one bit sourcing and the other sinking, and since the resistors giving the right LED currents are not-that-high-resistance, maybe this could result in too high currents and damage...
Or (since one intermediate step is actually enough) should I use a transistor to shunt an additional resistor?
Any idea?
Thanks in advance!