Odpověď na: Bargraf
Úvodní stránka › Fórum › Vaše projekty › Arduino › Bargraf › Odpověď na: Bargraf
Tak přátelé znalci troch jste mě jako začátečníka potrápili za což i díky kopírovat kódy jdou jednoduše. Tak že co třeba takhle ? Pokud to jde ještě jednodušeji pište. Díky.
int timer = 40;
int timer1 = 60;
void setup() {
  for (int thisPin = 2; thisPin < 12; thisPin++) {
    pinMode(thisPin, OUTPUT);}}
void loop() {
  for (int thisPin = 2; thisPin < 12; thisPin++) {
    digitalWrite(thisPin, HIGH);
    delay(timer);}
  for (int thisPin = 2; thisPin < 12; thisPin++) {
    digitalWrite(thisPin, LOW);
    delay(timer);}
  for (int thisPin = 12; thisPin >= 2; thisPin–) {
   digitalWrite(thisPin, HIGH);
   delay(timer1);}
  for (int thisPin = 12; thisPin >= 2; thisPin–) {
   digitalWrite(thisPin, LOW);
   delay(timer1);}
   }
