#define red 0
#define blue 1
#define green 4
void setup() 
{
  pinMode(red,OUTPUT);
  pinMode(green,OUTPUT);
  pinMode(blue,OUTPUT);
}
void loop() 
{
  int pwm_value;
  analogWrite(green,0);
  analogWrite(red, 255);   
  for(pwm_value=0;pwm_value<255;pwm_value+=5)
    {               
       analogWrite(blue, pwm_value);
       delay(200); 
    }
  for(pwm_value=0;pwm_value<255;pwm_value+=5)
    {          
       analogWrite(red,pwm_value);       
       delay(200); 
    }  
  analogWrite(blue, 0); 
  analogWrite(green, 255);       
  for(pwm_value=0;pwm_value<255;pwm_value+=5)
    {                
       analogWrite(red, pwm_value);
       delay(200); 
    } 
 for(pwm_value=0;pwm_value<255;pwm_value+=5)
    {                  
       analogWrite(green, pwm_value);
       delay(200); 
    }  
  analogWrite(red, 0); 
  analogWrite(green, 255);      
  for(pwm_value=0;pwm_value<255;pwm_value+=5)
    {                 
       analogWrite(blue, pwm_value);
       delay(200); 
    } 
for(pwm_value=0;pwm_value<255;pwm_value+=5)
    {                  
       analogWrite(green, pwm_value);
       delay(200); 
    } 
  analogWrite(red, 0);   
  for(pwm_value=0;pwm_value<255;pwm_value+=5)
    {               
       analogWrite(blue, pwm_value);
       analogWrite(green,255-pwm_value);
       delay(200); 
    } 
  for(pwm_value=0;pwm_value<255;pwm_value+=5)
    {               
       analogWrite(green, pwm_value);
       analogWrite(blue,255-pwm_value);
       delay(200); 
    }    
  analogWrite(green, 0);   
  for(pwm_value=0;pwm_value<255;pwm_value+=5)
    {               
       analogWrite(blue, pwm_value);
       analogWrite(red,255-pwm_value);
       delay(200); 
    } 
  for(pwm_value=0;pwm_value<255;pwm_value+=5)
    {               
       analogWrite(red, pwm_value);
       analogWrite(blue,255-pwm_value);
       delay(200); 
    }
  analogWrite(blue, 0);   
  for(pwm_value=0;pwm_value<255;pwm_value+=5)
    {               
       analogWrite(red, pwm_value);
       analogWrite(green,255-pwm_value);
       delay(200); 
    } 
  for(pwm_value=0;pwm_value<255;pwm_value+=5)
    {               
       analogWrite(green, pwm_value);
       analogWrite(red,255-pwm_value);
       delay(200); 
    }
}                 
ATTINY8520PU