Skip to content

Instantly share code, notes, and snippets.

@rubenCodeforges
Last active February 20, 2017 20:16
Show Gist options
  • Save rubenCodeforges/019a0ff082e7f5ed8634bd199121dd0b to your computer and use it in GitHub Desktop.
Save rubenCodeforges/019a0ff082e7f5ed8634bd199121dd0b to your computer and use it in GitHub Desktop.
asdasd
int kolichestvo_diodov = 15;
int nachalnij_nomer_pina = 3;
int intensivnost = 10;
void setup() {
for(int tekushi_diod_w_cikle = 0; tekushi_diod_w_cikle < kolichestvo_diodov; tekushi_diod_w_cikle++){
pinMode(nachalnij_nomer_pina + tekushi_diod_w_cikle, OUTPUT);
}
}
void loop() {
for(int tekushi_diod_w_cikle = 0; tekushi_diod_w_cikle < kolichestvo_diodov; tekushi_diod_w_cikle++){
analogWrite(nachalnij_nomer_pina + tekushi_diod_w_cikle, intensivnost);
intensivnost = intensivnost - 2;
if(intensivnost == 0) {
intensivnost = 10;
}
delay(100);
}
delay(500);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment