main: readadc10 4,w1 ' makes a 10 bit A-D conversion of the value at input 4 and sends to w1 sertxd (#w1,cr,lf) ' sends the value at w1 out to the Amaseis program if w1>600 then top ' sets the alarm threshold above the resting signal value (about 500) if w1<400 then bot ' sets the alarm threshold below the resting signal value pause 162 ' tells the picaxe to pause for 162 ms and gives 6 data feeds per second goto main ' loops the program back to the start top: ' when the signal >600 sound 2, (100,10) ' output 2 sounds a high note goto main ' loops the program back to the start bot: ' when the signal <400 sound 2, (50,10) ' output 2 sounds a low note goto main ' loops the program back to the start