// by Jon Williams // -- not for public release // // Connect 595 outputs to LEDs (active high) import stamp.core.*; import stamp.peripheral.io.SR74xx595; public class test595 { public static void main() { SR74xx595 leds = new SR74xx595(CPU.pin0, CPU.pin1, CPU.pin2); while (true) { for (int ping = 0x01; ping <= 0x40; ping <<= 1) { leds.out(ping); CPU.delay(1000); } for (int pong = 0x80; pong >= 0x02; pong >>= 1) { leds.out(pong); CPU.delay(1000); } } } }