void setup() {
// put your setup code here, to run once:
pinMode(15,OUTPUT);
pinMode(2,OUTPUT);
pinMode(4,OUTPUT);
}
int blue=15;
int red=2;
int green=4;
void display(int bluevalue,int redvalue,int greenvalue){
analogWrite(blue,bluevalue);
analogWrite(red,redvalue);
analogWrite(green,greenvalue);
}
void loop() {
for(int i=0;i<256;i++){
display(255,i,0);
delay(4);
}
for(int i=0;i<256;i++){
display(255-i,255-i,i);
delay(4);
}
for(int i=0;i<256;i++){
display(0,i,255-i);
delay(4);
}
for(int i=0;i<256;i++){
display(i,255-i,0);
delay(4);
}
}