Fairly easy:
unsigned char color;
//obtain color somehow
analogWrite(LED_G, color); //write color to green led
analogWrite(LED_R, -color); //write 255-color to red led
That's all it takes.
Fairly easy:
unsigned char color;
//obtain color somehow
analogWrite(LED_G, color); //write color to green led
analogWrite(LED_R, -color); //write 255-color to red led
That's all it takes.