int PinR = 6;
int PinG = 5;
int PinB = 3;
void setup() {
pinMode(PinR, OUTPUT);
pinMode(PinG, OUTPUT);
pinMode(PinB, OUTPUT);
}
void loop() {
color(255,0,0); // Color Rojo
delay(1000);
color(0,255,0); // Color Verde
delay(1000);
color(0,0,255); // Color Azul
delay(1000);
color(255,255,255); // Color Blanco
delay(1000);
color(245,255,250); // Color Crema de Menta
delay(1000);
color(0,0,0); // Color Negro
delay(1000);
}
void color(int R, int G, int B) {
R = 255 - R;
G = 255 - G;
B = 255 - B;
analogWrite(PinR, R);
analogWrite(PinG, G);
analogWrite(PinB, B);
}