74HC245N Octal bus transceiver; 3-state

74HC245N Octal bus transceiver; 3-state
  1. 74HC245N
int pins[] = {2,3,4,5,6,7,8,9}; void setup() { Serial.begin(9600); for (int i = 0; i < 8; i++) { pinMode(pins[i], OUTPUT); } } int counter = 0; void loop() { for (int i = 0; i < 8; i++) { digitalWrite(pins[i], counter==i); } counter++; if (counter > 7) { counter = 0; } Serial.print("counter: "); Serial.println(counter); delay(500); }