int indianpin = D7; // Define the LED pin of the color
int coralpin = D7;
int salmonpin = D7;
// the setup funtion runs once when you press reset and or power the board
void setup() {
//Define Pin
pinMode(indianpin,OUTPUT); //Determine the pin as an output
pinMode(coralpin,OUTPUT);
pinMode(salmonpin,OUTPUT);
}
// the loop funtion runs over and over again forever
void loop() {
setColor (205, 92, 92); //Indian Color (RGB)
delay (2000);
setColor (240, 128, 128); //Coral Color (RGB)
delay (2000);
setColor (255, 160, 12); //Salmon Color (RGB)
delay (2000);
}
void setColor (int indian, int coral, int salmon){
analogWrite(indianpin, indian); //Turn on the light of a certain color
analogWrite(coralpin, coral);
analogWrite(salmonpin, salmon);
}
A R D U I N O