#define R 26
#define G 25
#define B 33
void setup() {
Serial.begin(115200);
pinMode(R, OUTPUT);
pinMode(G, OUTPUT);
pinMode(B, OUTPUT);
}
void loop() {
int i;
LED_Display(255,0,0);
delay(1000);
LED_Display(0,255,0);
delay(1000);
LED_Display(0,0,255);
delay(1000);
for (i=0;i<255;i++){
LED_Display(i,255-i,0);
delay(10);
}
}
void LED_Display(byte rv,byte gv,byte bv){
analogWrite(R,rv);
analogWrite(G,gv);
analogWrite(B,bv);
}