REM +##########################################+ REM # # REM # Speed calculator program written by 1up. # REM # 'Stopwatch' function used to calculate # REM # the time it took to press each pad taken # REM # from http://www.qwerty.com/Scenetim.htm. # REM # I hope they don't mind. # REM # # REM +##########################################+ PORT = 889: REM 889 is the standard input port REM for most parallel ports. Yours REM may be different. 10 CLS 20 LOCATE 10, 20 30 PRINT "Speed Calculator by 1up" 40 LOCATE 11, 12 50 PRINT "Pad Delay Program Courtesy of qwerty.com" 60 LOCATE 13, 21 70 PRINT "Press any key to begin" 80 IF INKEY$ <> "" THEN GOTO 100 90 GOTO 80 100 CLS 110 LOCATE 10, 23 120 PRINT "Pad Spacing" 130 LOCATE 12, 5 140 PRINT "Enter the length the pads are spaced apart, in meters." 150 LOCATE 14, 25 160 INPUT PS: REM I know you're wondering. PS is for Pad Spacing. 170 CLS 180 LOCATE 10, 12 190 PRINT "Waiting for first pad to be depressed" 200 IF INP(PORT) = 95 THEN GOTO 230 210 GOTO 200 220 REM # REM # This next section is curtesy of REM # qwerty.com. REM # 230 PRINT TIMER - Clock! 240 Clock! = TIMER 250 IF INP(PORT) = 111 THEN GOTO 270 260 GOTO 250 270 LET TIME = TIMER - Clock! 280 Clock! = TIMER 290 REM # REM # Thank you qwerty.com. REM # 300 CLS 310 LET MPS = PS / TIME: REM m/s = distance/time 320 LET MPH = MPS * 2.23693629#: REM 1m/s = 2.23693629mph 330 LOCATE 10, 21 340 PRINT "Meters per Second: "; MPS 350 LOCATE 12, 23 360 PRINT "Miles per Hour: "; MPH 370 LOCATE 14, 26 380 PRINT "Do another? [Y/N]" 390 LOCATE 16, 30 400 INPUT YN$ 410 IF YN$ = "Y" OR YN$ = "y" THEN GOTO 170 420 IF YN$ = "N" OR YN$ = "n" THEN STOP 430 GOTO 390