symbol indata = b0 symbol piezoin = 1 'dip pin 6 symbol mosfet = 4 symbol longtime = 400 ' a little over 15 minutes symbol halfaminute = 13 main: low mosfet sleep halfaminute ' wait a bit when it first gets plugged in. work: gosub test goto work test: readadc piezoin, indata if indata > 0 then high mosfet sleep longtime else low mosfet endif return