/*void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
} */
int RedPin = 6;
int BluePin = 9;
int GreenPin = 10;
void setup() {
pinMode(RedPin, OUTPUT);
pinMode(BluePin, OUTPUT);
pinMode(GreenPin, OUTPUT);
}
void loop() {
setColor(0, 0, 0); // red
delay(1000);
setColor(0, 0, 0); // green
delay(1000);
setColor(230, 0, 0); // blue
delay(1000);
}
void setColor(int red, int green, int blue)
{
analogWrite(RedPin, 255-red);
analogWrite(GreenPin, 255-green);
analogWrite(BluePin, 255-blue);
}