int led = 10;
int led2 = 11;
int brightness = 0;
int fadeAmount = 5;
void setup() {
// put your setup code here, to run once:
pinMode(led,OUTPUT);
pinMode(led2, OUTPUT);
}
void loop() {digitalWrite(11, HIGH);
// put your main code here, to run repeatedly:
analogWrite(led, brightness);
analogWrite(led2, brightness);
brightness = brightness + fadeAmount;
if (brightness <= 0 || brightness >= 255) {
fadeAmount = -fadeAmount;
}
delay(30);
}