int led=11;
int wait=30;
void setup() {
// put your setup code here, to run once:
pinMode(led, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
for (int bright=0; bright <= 255; bright +=5)
{
analogWrite(led, bright);
delay(wait);
}
for (int bright=255; bright >= 0; bright -=5)
{
analogWrite(led, bright);
delay(wait);
}
}