//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#define LED 13
const int GREEN = A0; // LED OUTPUT ANALOG
const int YELLOW = A1; // LED OUTPUT ANALOG
const int RED = A2; // LED OUTPUT ANALOG
int VARX;
void setup() {
// put your setup code here, to run once:
pinMode(LED,OUTPUT);
}
void loop() {
// put your main code here, to run repeatedl y:
for(VARX=155;VARX<255;VARX++){ //VARIAR LA INTENSIDAD LUMINOSA
analogWrite(GREEN,VARX); //255=HIGH
analogWrite(YELLOW,VARX); //0=LOW
analogWrite(RED,VARX); //
delay(100);
}
for(VARX=0;VARX<10;VARX++){
digitalWrite(LED,HIGH); //ON LED
analogWrite(GREEN,255); //ON LED
analogWrite(YELLOW,255); //ON LED
analogWrite(RED,255); //ON LED
delay(1000);
digitalWrite(LED,LOW);
analogWrite(GREEN,0); //OFF LED
analogWrite(YELLOW,0); //OFF LED
analogWrite(RED,0); //OFF LED
delay(1000);
}
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Les deseo mucho éxito
y sigamos programando!!!