' Heat Beacon Stepper Motor Control ' ' "Defeating Infrared Motion Sensors" - GBPPR 'Zine #23 i var Byte x var Word B1 var Byte i = 0 x = 0 B1 = 0 Pause 5000 ' Wait a bit Poke 134, 128 ' Set Port B1-6 output, Port B7 input For i = 1 to 11 ' Turn pot, increase intensity Gosub Stepper1 Next i Button 7, 0, 255, 0, B1, 1, Loop1 ' Check time delay switch Sleep 600 ' 600 seconds or 10 minutes Loop2: For i = 1 to 11 ' Reverse direction of pot, lower intensity Gosub Stepper2 Next i Low 0 Low 1 Low 2 Low 3 End Loop1: Sleep 1800 ' 1800 seconds or 30 minutes Goto Loop2 Stepper1: Poke 6, 12 Pause 5000 Poke 6, 6 Pause 5000 Poke 6, 3 Pause 5000 Poke 6, 9 Pause 5000 Return Stepper2: Poke 6, 9 Pause 5000 Poke 6, 3 Pause 5000 Poke 6, 6 Pause 5000 Poke 6, 12 Pause 5000 Return