'====================================================================== ' File..... Fogger-Button-Control.bs1 ' Author... Steve-O @ The GARAGE OF EVIL!! ' Web...... http://www.garageofevil.com ' {$STAMP BS1} ' {$PBASIC 1.0} ' ' -----[ Program Descripton ]------------------------------------------ ' Using a Radio Shack SPST Switch Button (Part #275-011), connected via ' two wires (WR) on the Prop-1 to PIN0, when pressed, it completes the ' circuit, and the triggers a fogger to run and blast fog when holding ' it down via an RC-4 Control module. '====================================================================== ' -----[ Constants ]--------------------------------------------------- SYMBOL Sio = 7 SYMBOL Baud = OT2400 SYMBOL trigger = PIN0 SYMBOL IsOff = 0 SYMBOL IsOn = 1 ' -----[ Program Code ]------------------------------------------------ Main: DEBUG trigger PAUSE 200 DEBUG CLS IF trigger = IsOff THEN Main DEBUG trigger PAUSE 200 DEBUG CLS SEROUT Sio, Baud, ("!RC4", %11, "R", 4, 1) PAUSE 2000 SEROUT Sio, Baud, ("!RC4", %11, "R", 4, 0) DEBUG CLS GOTO Main