L603C Darlington Arrays

L603C Darlington Arrays
  1. L603C
int pins[] = {2,3,4,5,6,7,8,9}; int commonPin = 12; int count = 0; int v = 1; void setup() { for (int i = 0; i < 8; i++) { pinMode(pins[i], OUTPUT); } pinMode(commonPin, OUTPUT); digitalWrite(commonPin, HIGH); } void loop() { for (int i = 0; i < 8; i++) { digitalWrite(pins[i], i==count); } delay(100); if (count == 7) { digitalWrite(commonPin, LOW); delay(500); digitalWrite(commonPin, HIGH); v = -1; } else if (count == 0) { v = 1; } count = count + v; }