int temperature=0; int timer=0; // the setup function runs once when you press reset or power the board void setup() { // initialize digital pin 7 as an output. pinMode(7, OUTPUT); } // the loop function runs over and over again forever void loop() { timer=0; delay(2000); // have a 2 second break before the cycle starts each time while (timer<=50) { analogWrite(7, temperature); // turn the LED on with the temperature/brightness increasing at 1deg/min (note we have equated 1min=1millisecond) timer=timer+5; temperature=temperature+5; } while (timer<=410) { analogWrite(7, temperature); // turn the LED on with the temperature/brightness soaking at 70 degs for 6 hours. timer=timer+5; } while (timer<=435) { analogWrite(7, temperature); // turn the LED on with the temperature/brightness increasing at 2deg/min up to 120 deg C timer=timer+5; temperature=temperature+10; } while (timer<=495) { analogWrite(7, temperature); // turn the LED on with the temperature/brightness soaking at 120 deg for 1 hour timer=timer+5; } while (timer<=555) { analogWrite(7, temperature); // turn the LED on with the temperature/brightness decreasing at 1.67 degs per min timer=timer+5; temperature=temperature-(10/6*5); } }