File size: 402 Bytes
8e53a3e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/**
  Use bar LED
  10 APR 2025 by Blind Author
*/

#include <Arduino.h>

int pinList[] = {2, 4, 5, 12, 13, 14, 18, 19, 21, 22};

int threshold = 6;

void setup() {
  for (int i=0; i<10; i++) {
    pinMode(pinList[i], OUTPUT);
  }

  for (int i=0; i<10; i++) {
    if (i < threshold) {
      digitalWrite(pinList[i], HIGH);
    } else {
      digitalWrite(pinList[i], LOW);
    }
  }
}

void loop() {
}