#!/usr/bin/python
import wiringpi
import output_manual as o
from time import sleep

timerInner = .5

def rotate():
  for i in range(8):
    print("Selecting Latch: " + str(i))
    o.select_latch(i & 1, i & 2, i & 4)
    
    for j in range(8):
      o.select_latch_pin(j & 1, j & 2, j & 4)
      print("Triggering Pin: " + str(j))
      o.data(1)
      sleep(timerInner)
      o.data(0)
    
print("Selecting MUX1")
o.select_mux(0)

rotate()

print("Selecting MUX2")
o.select_mux(1)
rotate()
