'{$STAMP BS2} '{$PBASIC 2.5} ' 2008 mlab.taik.fi/paja ' Sending data to Serial port ' ---[ I/O Definitions ]--- pPot PIN 10 pSerial CON 16 'Pin 16 is serial port that is connected to your PC. ' ---[ Variables ]--- wResult VAR WORD ' ---[ Initialization ]--- DEBUG CLS, "Sending data to Serial port", CR ' ---[ Main Code ]--- Main: DO HIGH pPot ' charge the capacitor PAUSE 1 ' for 1 ms RCTIME pPot, 1, wResult ' measure RC discharge time DEBUG wResult/255 'Send raw data of integer, not ASCII code. PAUSE 100 LOOP END