/* Run1write.pde - Mama's BIG-IO-output write running light Run1write *PRELIMINARY* Arduino library BigIOoutput example Copyright (c) 2011 Devon Sean McCullough Licensed under the GPL (GNU Public License) HARDWARE Arduino <===> MotherboardShield <===> Mama's BIG-IO-output ====> 64 lamps <===> USB Serial <===> Programmer digital outputs to SRCLK, RCLK, SER optional outputs normally wired low to ~OE, high to ~SRCLR Arduino Hard- silk- Pin ware screen ---- ------ ------ D0 Serial RX D1 Serial TX D2 D3 D4 D5 D6 D7 BigO SER D8 D9 D10 BigO RCLK D11 D12 BigO SRCLK D13 GND BigO ~OE +5V BigO ~SRCLR Serial digital pins 0, 1. BigO digital pins 7, 10, 12. */ #include #ifdef DEBUG #define debug Serial.print #else #define debug(m) #endif // size mirror SER SRCLK RCLK BigIOoutput output( 64, NULL, 7, 12, 10); ///int test1 = (Serial.begin (115200), 0); ///int test2 = (Serial.print ("Bah"), 0); ///int test3 = (Serial.print ("Humbug"), 0); void setup() { /// int test4 = (Serial.print ("mystery\n"), 0); debug ("setup\n"); output.write((BigIO_t)0, 64, 0); } byte light = 0; void loop () { /// int test5 = (Serial.print ("confusion\n"), 0); debug (light ? "loop\n" : "loop 0\n"); byte olight = light; light = (light - 1 + 64) % 64; output.set(false, olight); // snuff the old lamp output.write(true, light); // light the new one delay(20); } ///int test6 = (setup(), 0); // end Run1write.pde