Stamp 1 BASIC program listing for the Heavy Lift demonstration device. 'HEAVY06.bas 'Heavy Lift MW Basic Stamp program - RG 9911.03 - 0002.10 'stamp 1 program for timing of heating and cooling of 375 wire 'test LEDs and buttons - but to no effect 'and cycle wire at fixed rate 'Two modes. Wake up in cycle mode, Mode 1, cycles at preset rate T 'Press grey button to reach Mode 2 'When red LED flashes, press white button to record new ON period T input 0 'Hold to Set On Time - white button input input 1 'Press for Set Time Mode - gray button input output 2 'green LED output output 3 'red LED output 'output 4 ' output 5 'MW output 'output 6 ' 'output 7 ' symbol i = w0 'counter i symbol T = w1 'timer T T = 500 goto loop1 'Mode 1 Program loop Mode1: 'if mode change - indicate Mode 1 if T < 3000 then Mode11 T = 3000 'set max T value Mode11: pin5 = 0 'Muscle Wire OFF for i = 1 to 5 '5 slow flashes indicate Mode 2 done, now mode 1 pin3 = 0 'red OFF pause 200 pin3 = 1 'red ON pause 200 next i 'debug T goto MWoff loop1: 'Main loop to power wire or to wait for Set Time Mode command if pin1 = 0 then Mode2 'if Set Time Mode grey button pressed goto Mode2 pin3 = 0 'red OFF pin5 = 1 'Muscle Wire ON pin2 = 1 'green ON for i = 1 to T 'pause for 1x if pin1 = 0 then Mode2 'if Set Time Mode grey button pressed goto Mode2 pause 1 next i MWoff: 'turn wire off pin5 = 0 'Muscle Wire OFF pin2 = 0 'green OFF pin3 = 1 'red ON for i = 1 to T 'pause for 12x if pin1 = 0 then Mode2 'if Set Time Mode grey button pressed goto Mode2 pause 12 next i goto loop1 '*********** 'Mode 2 - Set Time Mode - Next press and hold white button to set ON time Mode2: 'wait loop until white Set Time button is pressed pin5 = 0 'Muscle Wire OFF pin2 = 0 'green OFF loop2: toggle 3 'blink red light pause 50 if pin0 = 1 then Loop2 'if white button NOT YET pressed then keep waiting 'when Set On Time white button is pressed continue below T = 100 'clear T counter loop3: 'Count total time of white Set Time Button being pressed if pin0 = 1 then Mode1 'if white button is NO LONGER pressed goto Mode1 pin5 = 1 'Muscle Wire ON pin3 = 1 'red ON T = T + 1 'increment T - count length of ON time goto loop3 'END