import stamp.peripheral.relay.dc16.DC16; import stamp.core.*; public class Testing2 { static Uart serialTx = new Uart(Uart.dirTransmit,CPU.pin15,Uart.dontInvert,Uart.speed2400,Uart.stop1); static Uart serialRx = new Uart(Uart.dirReceive,CPU.pin15,Uart.dontInvert,Uart.speed2400,Uart.stop1); static Timer time = new Timer(); public static void main() { // static Uart dc16IO = new Uart(Uart.dirReceive,CPU.pin0,Uart.dontInvert,Uart.speed2400,Uart.stop1); // static DC16 myDC16 = new DC16(dc16IO,dc16IO,3); //DC16 board on address 3 DC16 dc = new DC16(serialTx, serialRx, 3); // System.out.println(dc.GetFirmwareVersion()); int step1 = 1; int step2 = 2; int step3 = 4; int step4 = 8; while (true) { dc.SetupLowOutputs(step1); System.out.print("Step 1 "); time.mark(); while (!time.timeout(1000)); dc.SetupLowOutputs(step2); System.out.print("Step 2 "); time.mark(); while (!time.timeout(1000)); dc.SetupLowOutputs(step3); System.out.print("Step 3 "); time.mark(); while (!time.timeout(1000)); dc.SetupLowOutputs(step4); System.out.print("Step 4 "); time.mark(); while (!time.timeout(1000)); } } }