Author | Comment |
zarg Dragoon
Posted: 6 Sep 2008 14:30 GMT Total Posts: 67 | Ok. So I look up how to work getcalc( on a ti guidebook pdf file. So I have one Ti 84+SE calculator and a commputer running TI-83+ Flash debuger. The commputer is set on a TI 83+SE. It runs just like my calculator. Then I created a program. Some code is:
Disp "One partner must" Disp "Host and one" Disp "Must join" Input "Host(1-Y, 2-N)",X 0üÁ 0üZ ClrHome If X=1 Goto A If X=2 Goto B Lbl A Disp "Searching. . ." While Á=0 GetCalc(Á) End 1üZ Goto C Lbl B 1üÁ Disp "Searching. . ." While Z=0 GetCalc(Z) End Goto C Lbl C ClrHome Disp "Connected" Disp "Select command:" Disp "Rock=1" Disp "Paper=2" Disp "Sissors=3" Input "Command: ",A ClrHome Jü0 Hü0 If X=1 HüA If X=2 JüA If X=1 Then Disp "Searching. . ." While J=0 GetCalc(J) End BüJ End If X=2 Then Disp "Searching. . ." While H=0 GetCalc(H) End BüH End Disp "Connected"
Ok. ü meens sto on a Ti84+SE aka saving a varable. Ex. xüp or x=p And while Á=0 meens while A is not equal to zero
When I run this code the calculators freeze up on the "searching. . ." part. Can you help me figure out why, and how to get around this problem. Also I tryed running just the getcalc( command on my calculator to the commputer but it did nothing. My commputer is set up to talk on the USB port, black cable, and Enable simulator to cable link.
Thanks. Zarg
--- In most countries selling harmful things like drugs is punishable. Then howcome people can sell Microsoft software and go unpunished? (By hasku@rost.abo.fi, Hasse Skrifvars http://www.linuxweb.com/lw_quotes.html) |
Vectris Ultralisk
Posted: 6 Sep 2008 18:09 GMT Total Posts: 375 | By the 'u' and 'a' you mean that you put those in yourself right, thats not how they look for when on the calc? Well those are horrible symbols, sorry, use these.
For Store use => or -> For Equals not use =!
or if your really good just use the actual symbols for them ≠ and →
I'll read your code now and see if I can offer some advice.
EDIT: Ok here are some small things, use strings with Input for the Y or N.
:Input "Host, Y or N:",Str1
To get a string press Vars, 7, and choose a string, strings can store letters so use those for text.
Also to optimize your Disps at the beginning, use one continuous Disp by putting a comma after the quote, then another quote and beginning again.
:Disp "One partner must","Host and one","Must Join
Always leave off the last quote as it's not needed.
Ok at the moment I see nothing wrong (scissors is spelled wrong) but if you can use the symbols I gave you to make your code look better I may be able to find something. And are you making sure to mark one calc as host and one as client? |
Hydraliskisback Wraith
Posted: 6 Sep 2008 21:30 GMT Total Posts: 583 | "Always leave off the last quote as it's not needed." does it waste memory or something? being anal, i always put in the last quote, myself.
--- Iff Hydralisk has posted the above, the above is stupid. |
zarg Dragoon
Posted: 7 Sep 2008 03:44 GMT Total Posts: 67 | Ok. I see what you are saying calcproductions. I used those symbles because when I copy and pasted my code from TI-Graph Link 83+ to this fourm that's what it changed to. I also discovered that I cannot get the "getcalc(" function to talk to the commputer and snag a variable. I'm not sure if it's something in the code that's wrong or what? I'll rewrite my code now... Ok. Here it is:
prgram URBS ClrHome Disp "Welcome to","Ultimate Rock","Paper Sissors","Made By:","Zachary Lawrence","Version 1.0 Beta" Pause ClrHome Disp X Disp "Wins in a row" Pause ClrHome Disp "Find a partner:","Press enter when","You have","Connected your","Cable to","Your partner" Pause ClrHome Disp "One partner must","Host and one","Must join" Input "Host(1-Y, 2-N)",Str1 0->(omega) 0->Z ClrHome If X=1 Goto A If X=2 Goto B Lbl A Disp "Searching. . ." While (omega)=0 GetCalc((omega)) End 1->Z Goto C Lbl B 1->Á Disp "Searching. . ." While Z=0 GetCalc(Z) End Goto C Lbl C ClrHome Disp "Connected" Disp "Select command:" Disp "Rock=1" Disp "Paper=2" Disp "Sissors=3" Input "Command: ",A ClrHome J->0 H->0 If X=1 H->A If X=2 J->A If X=1 Then Disp "Searching. . ." While J=0 GetCalc(J) End B->J End If X=2 Then Disp "Searching. . ." While H=0 GetCalc(H) End B->H End Disp "Connected" If A=1 Then If B=!3 Asm(prgmROCK End If A=2 Then If B=!1 Asm(prgmROCK End If A=3 Then If B=!2 Asm(prgmROCK End Pause
program rock AsmPrgm 18FE
:)
--- In most countries selling harmful things like drugs is punishable. Then howcome people can sell Microsoft software and go unpunished? (By hasku@rost.abo.fi, Hasse Skrifvars http://www.linuxweb.com/lw_quotes.html) |
Vectris Ultralisk
Posted: 7 Sep 2008 10:04 GMT Total Posts: 375 | @Hydraliskisback I'm surprised! Leaving off the last quote (or parenthesis even) is one of the most common ways to save space, so yes you definetly want to do it whenever possible, it's also easier to just forget putting it on the end. It works the same with or without it, just smaller without ;)/
@zarg wooh, now your trying to use GetCalc( to get stuff from the computer? GetCalc( is calculator to calculator, not calc to computer. I think that was a typo?
And now to your code. I guess you aren't as familiar with strings as I thought >.< thats ok. See this part.
(ignore the periods, spaces didn't work).
Input "Host(1-Y, 2-N)",Str1 0->(omega) 0->Z ClrHome If X=1 . . .You forgot to replace X here with Str1 Goto A If X=2 . . .And here, do it like this If Str1="1 Goto B . . .You have to put a quote first too, but leave the last one . . . . . .off for space
Oh, and after you fix that I found your original problem.
While (omega)=0 GetCalc((omega)) End
You have to store omega once you use getcalc like this:
GetCalc(OMEGA->OMEGA
And yes you can leave off the last parenthesis again even if you put store after it. Also take off all your last quotes to save space. |
zarg Dragoon
Posted: 7 Sep 2008 10:16 GMT Total Posts: 67 | Thank you very much. I'll test it now.
Edit: I got a syntax on "GetCalc((omega)->(omega)"
--- In most countries selling harmful things like drugs is punishable. Then howcome people can sell Microsoft software and go unpunished? (By hasku@rost.abo.fi, Hasse Skrifvars http://www.linuxweb.com/lw_quotes.html) |
Hydraliskisback Wraith
Posted: 7 Sep 2008 14:06 GMT Total Posts: 583 | @calcproductions lol why so surprised? i never knew it would work without. i just wanted to be safe i guess.
--- Iff Hydralisk has posted the above, the above is stupid. |
Vectris Ultralisk
Posted: 7 Sep 2008 14:19 GMT Total Posts: 375 | @HIB No I mean that's fine. It's just that I have reversed programmed thousands of basic programs (when I first started learning it was the bets way to learn more =P) and I've only seen a few who didn't take of the quotes, it's just rare to find a programmer who hasn't already heard it from someone else (or figured it out themselves).
Ya your right sorry, it's been a while since I used that command. I'm pretty sure you have it right (once you change it back to GetCalc(X), it's the fact that your trying to use TI-83 Debugger to do it, I know they say it works but I've never gotten it to work myself. It's probably a setting in the program that's messing you up now, not so much your code. Test with a real calc if you get the chance. |
Hydraliskisback Wraith
Posted: 7 Sep 2008 15:38 GMT Total Posts: 583 | @calc i see. haha.
--- Iff Hydralisk has posted the above, the above is stupid. |
zarg Dragoon
Posted: 9 Sep 2008 04:09 GMT Total Posts: 67 | allright thanks.
--- In most countries selling harmful things like drugs is punishable. Then howcome people can sell Microsoft software and go unpunished? (By hasku@rost.abo.fi, Hasse Skrifvars http://www.linuxweb.com/lw_quotes.html) |
zarg Dragoon
Posted: 11 Sep 2008 16:35 GMT Total Posts: 67 | Yep I got everything to work.
Thanks, Zarg
--- In most countries selling harmful things like drugs is punishable. Then howcome people can sell Microsoft software and go unpunished? (By hasku@rost.abo.fi, Hasse Skrifvars http://www.linuxweb.com/lw_quotes.html) |
Vectris Ultralisk
Posted: 11 Sep 2008 17:16 GMT Total Posts: 375 | So, mind telling us how you got it to work? I'm interested if you actually got the computer TI debugger to link to your 84, fill us in! |
BrandonW Goliath Posted: 11 Sep 2008 19:15 GMT Total Posts: 100 | I use the 83+ Flash debugger for linking to a real calculator all the time. I personally think it's the best way to test linking stuff. X-Link, UnivOS, periph8x (the I/O part), and LinkMan were all written that way.
|
Vectris Ultralisk
Posted: 12 Sep 2008 13:27 GMT Total Posts: 375 | Well it never works for me, do you have to change some settings to get the calcs to pick eachother up? |
zarg Dragoon
Posted: 12 Sep 2008 15:16 GMT Total Posts: 67 | Yeah. I couldn't get it to talk to the commputer. I just used a fried's calculator at school. I think that there is some setting you can change but I haven't found it yet. At http://education.ti.com/guidebooks/graphing/84p/TI84PlusGuidebook_Part2_EN.pdf it explanes it some(under programing, I/O) but not in much deatail. Tell me if you find out anything else. Thanks.
--- In most countries selling harmful things like drugs is punishable. Then howcome people can sell Microsoft software and go unpunished? (By hasku@rost.abo.fi, Hasse Skrifvars http://www.linuxweb.com/lw_quotes.html) |
Hydraliskisback Wraith
Posted: 12 Sep 2008 20:26 GMT Total Posts: 583 | i never could get calcs to talk to eachother properly. ticked me off. i wanted to make a deathmatch game :D which was my project before i started escape, so it turned out ok.
--- Iff Hydralisk has posted the above, the above is stupid. |
zarg Dragoon
Posted: 13 Sep 2008 12:16 GMT Total Posts: 67 | It's tough to get working correctly. I just used trial and error untill it worked.
--- In most countries selling harmful things like drugs is punishable. Then howcome people can sell Microsoft software and go unpunished? (By hasku@rost.abo.fi, Hasse Skrifvars http://www.linuxweb.com/lw_quotes.html) |