How do you calculate the resistor value for a bicolor led
We need a source that provides 30mA with 0 or 5V. The voltage at the divider output will be 5V - 2V = 3V ( or 2V if 0V is applied). So we have a 0.5V variation for 30mA. The equivalent source will be 0.5V / 30mA = 16.7 ohms. Each resistor must be 33.3ohms to give parallel combination of 16.7. This will only work if the micro source impedance is low.