MAJI@SLACVM.SLAC.STANFORD.EDU (Ji Ma) (12/11/90)
Hi, I design a small program which allow you to dial a phone number by your ti computer. Following is the program. You have to put your phone receiver close to tv speaker in order to work. Good Luck and have fun! FUNCTION: automatic touch tone dialor INPUT : phone number OUTPUT : dial tone Version : 1.00 (c) 5-DEC-89 LANGUAGE: TI Basic PROGRAM : ! TONE_TAB stores tones for each digits DIM TONE_TAB(9,2) ! fill the tone table FOR I=1 TO 2 FOR J=0 TO 9 READ TONE_TAB(J,I) NEXT J NEXT I ! data block DATA 914,697,697,770,770,770,852,852,852 DATA 1336,1209,1336,1477,1209,1336,1477,1209,1336,1477 ! dialing loop DISPLAY AT(11,1) ERASE ALL:"MOVE PHONE RECEIVER CLOSE TO TV SPEAKER" 1 DISPLAY AT(12,1) BELL:"ENTER PHONE NUMBER? (0 to exit) " ACCEPT AT(12,21)VALIDATE(NUMERICAL):PHNUM$ IF PHNUM$="0" THEN STOP ELSE CALL GTONE(PHNUM$) :: GOTO L1 ! extract each digit and produce the sound SUB GTONE(N$) duration of dialing tone (100ms), loudest volume DUR=100 :: VOL=0 FOR I=1 TO LEN(N$) N=VAL(SEG$(N$),I,1)) CALL SOUND(DUR,TONE_TAB(N,1),VOL,TONE_TAB(N,2),VOL) FOR DELAY=1 TO 100 :: NEXT DELAY NEXT I SUBEND
markw@airgun.wg.waii.com (Mark Whetzel) (12/21/90)
In article <90344.133141MAJI@SLACVM.SLAC.STANFORD.EDU>, MAJI@SLACVM.SLAC.STANFORD.EDU (Ji Ma) writes: > Hi, I design a small program which allow you to dial a phone number by > your ti computer. Following is the program. You have to put your phone > receiver close to tv speaker in order to work. Good Luck and have fun! [some program code deleted] > ! data block > DATA 914,697,697,770,770,770,852,852,852 > DATA 1336,1209,1336,1477,1209,1336,1477,1209,1336,1477 Neat program idea, but... Uh, pardon me, but are there not supposed to be 20 values? Two are used for each digit. yes? I am guessing, as I do not know what the tone values are actually supposed to be (of the top of my head :-), but as I recall, each column of digits uses the same tone. Each row uses the same tone. Guessing would seem to indicate that one of the 697's is missing, as digits 1,2,3 across would share the same row tone. yes? Later markw -- Mark Whetzel My comments are my own, not my company's. Western Geophysical - A division of Western Atlas International, A Litton/Dresser Company DOMAIN addr: markw@airgun.wg.waii.com UUNET address: uunet!airgun!markw