# Should I post a program for a timer (TI-84 Calculator)?



## tpt8899 (Dec 6, 2013)

Download the zip file here, then extract it anywhere on your PC.
Next, download TI connect (If you don't have it yet) here.
Then, connect your calculator to your PC using the chord that came with it.
Finally, open up TI connect, click Send to TI device, click select your device and select it, then click browse and find the .8xg file, then click send to device!
After its on your device, you will need to click second-memory (2nd+Plus) then click the eight button which should lead you to two menus - Group and Ungroup. Choose the ungroup menu by clicking the left/right arrows, and then click the version of the timer. If it asks about duplicate name, click overwrite all (3)

TO-DO for next version:
-Make scramblers for all WCA puzzles
-See if it is possible to optimize the code
- Make the timing screen like the inspection screen (add the ////s in between the "go!" sign and the time. Also might switch the "Go!" to "Timing!"


----------



## SnipeCube (Dec 6, 2013)

Yes! That would be awesome! I spent $130 on a calculator that I use once or twice a month. I would love to have this!


----------



## tpt8899 (Dec 6, 2013)

SnipeCube said:


> Yes! That would be awesome! I spent $130 on a calculator that I use once or twice a month. I would love to have this!



OK! Ill finish the coding (It will be a group of programs though, and it involves some variables... just a heads up) 

Thanks for the reply BTW


----------



## Yuxuibbs (Dec 6, 2013)

Yes!
I can time myself during class


----------



## tpt8899 (Dec 6, 2013)

Yuxuibbs said:


> Yes!
> I can time myself during class



OK then! Beware of memory though (can run out over 1 min depending on memory left)


----------



## AlexMaass (Dec 6, 2013)

Sure I would love this! And I would love a Pyraminx option with a good scrambler though if you can!


----------



## AndersB (Dec 6, 2013)

This would be awesome!!! I would use this a lot


----------



## Michael Womack (Dec 6, 2013)

I would love to try it only if I can find my Ti-83. I can only find my Ti-83 handbook. Never mind I found the calculator.


----------



## Yuxuibbs (Dec 6, 2013)

tpt8899 said:


> OK then! Beware of memory though (can run out over 1 min depending on memory left)



I have the TI 84+ and I deleted all the apps I didn't need when I got the calculator(which was over half the apps) so hopefully there's enough memory


----------



## tpt8899 (Dec 6, 2013)

that's good. Just putting on the finishing touches now!


----------



## tpt8899 (Dec 6, 2013)

AlexMaass said:


> Sure I would love this! And I would love a Pyraminx option with a good scrambler though if you can!



I just need to know the notations oh yea and beware, the scrambler sometimes puts down like B B B or B B' (Dunno how to improve that yet  ))


----------



## Dapianokid (Dec 6, 2013)

I'm a calculator enthusiast. I wrote one that works on all models in the 8x line in Axe, which is run with the Asm( command. Should I post it? It includes those features, plus avgs and other statistics and scamblers for 2x2-5x5. It's accurate so that it loses one second every 20 minutes so it's fine.

I could rewrite mine to be able to interface with a computer for fun, and also upload the files to a computer in a .txt file.
In fact, (I love calculators. Check out Omnimaga.org when you get a chance!! ) I should just write a better sim for calcs...


----------



## Chree (Dec 6, 2013)

tpt8899 said:


> OK then! Beware of memory though (can run out over 1 min depending on memory left)



Do you mean the memory runs out on your calculator is you let it run for over 1 minute? If so, it sounds like you're nesting too much... and not cleanly. If not, then I just don't understand this statement.

I'll be interested to take a look at the code. I programmed the TI-83 for years, (http://www.ticalc.org/archives/files/authors/31/3163.html) and simulating accurate timing was impossible. It depended on things like free memory, battery life, and how optimized the coding was. But I love that the TI-84 has a built in clock.


----------



## Chree (Dec 6, 2013)

tpt8899 said:


> I just need to know the notations oh yea and beware, the scrambler sometimes puts down like B B B or B B' (Dunno how to improve that yet  ))



When I made my own scramble, I assigned more than 1 variable of random numbers. So in this example, A is the next letter in the scramble. B is a place holder of that letter.

It will repeat the random number generator until the next letter of the scramble doesn't match the one before. This prevents things like "B B B' B B2 B". It will never choose the same face twice in a row.

Then it chooses C, what direction the face is rotated (Cw is blank, ccw is ', 180 turn is 2")

"SCRAMBLE: " -> Str1
0 -> A
0 -> B
For(S,1,25)
Repeat A != B
randInt(1,6) -> B
End
B -> A
randInt(1,3) -> C
Str1+sub("RLUDFB",A,1)+sub(" '2",C,1)+" " -> Str1
End

This will not store the scramble in a list or matrix or anything. It just creates a string that looks like "SCRAMBLE: F' U2 D R L' R B U2..." 25 moves long.


----------



## Chree (Dec 6, 2013)

Chree said:


> "SCRAMBLE: " -> Str1
> 0 -> A
> 0 -> B
> For(S,1,25)
> ...



I could further optimize this to use two less variables, neither B nor C, in TI coding. I know this will work for the 83's, it should work for 84s as well.

"SCRAMBLE: " -> Str1
0 -> A
For(S,1,25)
Repeat A != Ans
randInt(1,6)
End
Ans -> A
Str1+sub("RLUDFB",A,1)+sub(" '2",randInt(1,3),1)+" " -> Str1
End


----------



## Dapianokid (Dec 6, 2013)

My variable for time takes up two bytes of memory and there is no leaks. My program takes up less than 2k bytes during execution.
Oh hey it's Chris!


----------



## Deleted member 19792 (Dec 6, 2013)

Awesome! Maybe I can help. You can probably do 

"B" = 1

"B'"= 2

Then have A-Y as scramble variables. 

If A = 1 and B = 1 (or 2) then

B = randint( 1-12 -> B 

That probably works.


----------



## Tarhilion (Dec 7, 2013)

Yes! This sounds really awesome!


----------



## Chree (Dec 7, 2013)

Dapianokid said:


> My variable for time takes up two bytes of memory and there is no leaks. My program takes up less than 2k bytes during execution.
> Oh hey it's Chris!



Now you got me all curious... who's this? (PM me if you prefer)


----------



## tpt8899 (Dec 7, 2013)

strakerak said:


> Awesome! Maybe I can help. You can probably do
> 
> "B" = 1
> 
> ...



That might work... I'm trying to get a few people to help right now


----------



## Dapianokid (Dec 7, 2013)

Chree, I've never actually technically contributed to any major projects, but I have helped with a lot of them, especially in helping others with projects. Majorly involved in things like TI-boy_SE help, Linux for Nspires, and DoorsCS brainstorming


----------



## Chree (Dec 7, 2013)

There must also be another Chris in the room. I thought you said "Hey Chris" to me


----------



## aHappyAsian (Dec 30, 2013)

That would be awesome I'm always cubing in math class anyway. If you do upload it could you do a tutorial to go along with it because I have no idea how to do stuff on my calc yet


----------



## tpt8899 (Dec 30, 2013)

Almost done...


----------



## Christopher Mowla (Dec 31, 2013)

@tpt8899,
In what environment do you program Ti-BASIC in? As an experienced programmer in this language, I found that if you write the code in Microsoft Word (using the Ti-83p font from Ti-Connect), it's much easier to write more complicated programs, as you can indent your code and see it on a big screen. Then you can just copy the code into the Ti-Graph link program, save and then run on your computer with the SDK to test it.

Just to let you know if you're still programming it on that small screen.


----------



## tpt8899 (Jan 3, 2014)

I code using a TI-Basics Coder, and my calculator. The (computer) coder is basically Notepad ++ for TI-Basics. I use the calculator for the minor tweaks sometimes, but mostly the computer (Find function OP )... My calculator ran out of battery today (Back up is out also) so I lost a bit of the code (I changed a bit on the calculator. I still have backups on the computer though - phew... Minor setback...)


----------



## Kirjava (Jan 3, 2014)

I don't get why you'd ask if you should post it instead of just posting it.


----------



## Lchu613 (Jan 4, 2014)

Kirjava said:


> I don't get why you'd ask if you should post it instead of just posting it.



True. I'm guessing he wanted to make sure people would actually look at it so he didn't waste his time.


----------



## tpt8899 (Jan 11, 2014)

Lchu613 said:


> True. I'm guessing he wanted to make sure people would actually look at it so he didn't waste his time.



Precisely - I wanted to see if people wanted to actually use it before fixing all the bugs that don't bother me, but might bother others.


----------



## Trexrush1 (Jan 11, 2014)

How do you make the simple timer? I have a ti-84 Plus C SE
And this was how I planned it-
Press enter, timer starts.
Press enter again, timer stops.
Rerun program for more times, or clrhrome after, like, 5 seconds of pause.

Oh, and the timer with scrambles is a great idea. I just want to know how to do something simple myself.


----------



## Ptr8888 (Apr 30, 2014)

We really really need this!!!


----------



## TiVe (Oct 13, 2014)

Still waiting


----------



## TimMc (Oct 13, 2014)

It might be worth considering *Lbl If Goto* to see whether it's faster than *For()*

*If Goto* etc may be faster than *sub()* too in TI-BASIC.

Tim.


----------



## tpt8899 (Oct 13, 2014)

Wow. U guys still intrested in program? Ok. THe files got delted in a calculator reset so I'll start over.


----------



## Chree (Oct 13, 2014)

TimMc said:


> It might be worth considering *Lbl If Goto* to see whether it's faster than *For()*
> 
> *If Goto* etc may be faster than *sub()* too in TI-BASIC.
> 
> Tim.



For() is much faster than Lbl/Goto and is less likely to be a source of memory leaks.

Every time the command "Goto" is used, the entire program is scanned for the associated Label, starting from the top and working its way down. Depending on the length of the program, that can cost more speed than a enclosed function like For().

Also, if Goto is located within a thread like If/Then/Else/End, the "End" part will never be reached and the thread will remain open, meaning a memory leak. If that happens enough times in one session, the calculator will run out of memory and the program will crash.

You probably know this, but I felt a need to explain my answer for anyone who wasn't as familiar with TI-BASIC.


----------



## Christopher Mowla (Oct 14, 2014)

tpt8899 said:


> Wow. U guys still intrested in program? Ok. THe files got delted in a calculator reset so I'll start over.


It's a shame that happened. Did you know you can "back up" and recover lost programs?

Several years ago, I programmed this calculator a lot (TI-84 plus).

Here is my 16k application (Program Manager) which I made which lets you do all types of things with programs (perhaps you have heard of *prgm hiding* and *prgm* *protecting *before).

To recover, go to "Manage All"->"More".



To backup a prgm, simply archive it. If it is later put in RAM again, and the RAM gets cleared, you can recover it with my app (you must garbage collect the first time after you install my app). 
The only difference between my "archive all" routine and my "backup" routine is that my "backup" routine will leave all programs which were in RAM in RAM, but my "archive all" routine will obviously put all prgms in the archive. 
*Note that all prgm backups are deleted after a garbage collect.* (My "backup" routine asks you to garbage collect only because of this reason, but you can simply backup a prgm simply by archiving it outside of my application like normal: you just need to use my app to recover a lost prgm from a RAM clear). 
Since a garbage collect clears all previous backups, if after a while, you have multiple copies of the same prgm backed up and it becomes to "crowded", just run a garbage collect for a fresh start. 
As implied in the last statement, you can use this app to backup as many copies *of the same prgm* as you like, simply by archiving it each time. I believe the latest backup is shown in my app first (so you have to press the down arrow and put the backup into RAM until you find the version of the prgm you are looking for). This comes in handy when you are programming on the calculator because it's saving multiple copies just in case you mess up and wish to revert back to a previous change. 
Just in case you are curious, I didn't program the assembly prgms: I just used Ti-BASIC to make an interface. 

EDIT:
Another fun routine you will see in my app (which I have not seen anywhere) is a program counter. (It counts how many unhidden prgms are on your calc.)

Also, did you know that this calculator can play music? I made a timer prgm (not accurate though) in the past and, when the timer was finished, my calculator, which was plugged into speakers, sent a beeping sound to the speakers!

In addition, I made an app which was an improvement to a music-making program (the interface resembles a music staff). (I mainly implemented a saving feature to save your songs so that you could have as many as your calculator can hold in the archive!)

In that app, I have also used someone's Morse Code, and thus you can type in a message in English, and the calculator will play the Morse Code on your speakers (or headphones).

You just need to go to Radio Shack and purchase a 3.5mm To 2.5mm Stereo Audio Adapter which fits into your calc and for which you plug your speaker or headset into. (You can buy it from Radio Shack, if you live in the US.)

EDIT2:
Here is a program someone made which you can record a real music clip (or clip from a movie, etc.) to your calc in the for of a large application. You just need to go get that adapter! Lastly, on this programmer's page, he has a clip from the film "Brave Heart" there!


----------



## tpt8899 (Oct 18, 2014)

Anyone know how to do averages in lists? I know means... Also, anyone know how to do an average of only like the last 5 numbers in the list?


----------



## zendenz (Oct 18, 2014)

you have my full support. please upload it!


----------



## Christopher Mowla (Oct 19, 2014)

tpt8899 said:


> Anyone know how to do averages in lists? I know means... Also, anyone know how to do an average of only like the last 5 numbers in the list?






​ Program Download​ 
I added in some extra things, but I put comments above the lines of code needed. If you don't use custom names for lists, I encourage you to do so (lists can have up to 5 character names, but the first character must be a letter) like I did. I used the default list L2 because I used it as a dummy variable.

The code can easily be modified to calculate the current average of 12 simply by subtracting 12 instead of 5 in the first line of "real code".

If you have any other questions, just ask.


----------



## tpt8899 (Oct 19, 2014)

Thanks a bunch for the help! I am in a dilemma - I know I probably could combine these two ideas, but I'll take it one step at a time

Option 1: Have one huge never-ending session, but have the ability to plot points using the statplot function (possibly)
OR
Option 2: Have multiple session capabilities, but more code needed...

I'm probably heading to option one with the code that cmwola has sent... Thanks for the support everyone! I'll try to release an alpha version version by next saturday...


----------



## tpt8899 (Oct 19, 2014)

Another quick question - would you guys prefer to see the whole thing in one huge program (probs going to have to change my lbl methods, which I know how to fix), or would you guys be fine with it being a group of programs? I am leaning towards the one big program. What dyou guys think?


----------



## Christopher Mowla (Oct 19, 2014)

tpt8899 said:


> Another quick question - would you guys prefer to see the whole thing in one huge program (probs going to have to change my lbl methods, which I know how to fix), or would you guys be fine with it being a group of programs? I am leaning towards the one big program. What dyou guys think?


You could always do _both_. That is, you can make an app. I used to try to program everything into a single prgm, but constructing a program as a group of programs is the _smarter_ way to program, even on the calculator. I was going to give you that code as two separate programs, but I wasn't sure what you wanted to do.

In addition, I'm not sure how you have constructed your program to give you further advice on what to do. If you pm me your current code, I can make a more educated suggestion. Speaking of which, if you do decide to make an app but can't run Basic Builder 3.0 on your machine (it's for windows), you can send me your group of programs, and I will send you the app version.


----------



## tpt8899 (Oct 19, 2014)

OK I'll transfer the files to my computer quick.


----------



## tpt8899 (Oct 19, 2014)

How should I send the files to you? (Email? If so, pls PM me your email)


----------



## tpt8899 (Oct 24, 2014)

OK. The basic version of the timer is now complete! The only working scramble is the 3x3x3, so be warned. All sessions are saved individually, so a 2x2 solve won't go with any 3x3 solves, etc. I am currently working on doing all the scrambles. Documentation (Help guide) is soon to come.

MAJOR thanks to Cmowla for helping me a lot with the coding! He deserves a whole lot of credit for what he's done. So I would like to give you due credit!

So here's how to get the timer to your calculator:
 Download the zip file here, then extract it anywhere on your PC.
Next, download TI connect (If you don't have it yet) here.
Then, connect your calculator to your PC using the chord that came with it.
Finally, open up TI connect, click Send to TI device, click select your device and select it, then click browse and find the .8xg file, then click send to device!
After its on your device, you will need to click second-memory (2nd+Plus) then click the eight button which should lead you to two menus - Group and Ungroup. Choose the ungroup menu by clicking the left/right arrows, and then click the version of the timer. If it asks about duplicate name, click overwrite all (3)

If there are any bugs, fill out the bug report form: https://drive.google.com/open?id=1dE-Popx-cqwuRg0JbynaAjWF0grWo1Wy0PBdTisklVc&authuser=0
If you have any suggestions, fill out the suggestions form: https://drive.google.com/open?id=1L-4h5ctvl2q7FA2bDPIqsiQ8ebkZ8Jg0_x1ladC3moY&authuser=0

Edit: I will also keep the OP updated, as well as place the bug report and suggestions form there.


----------



## Christopher Mowla (Oct 24, 2014)

tpt8899 said:


> MAJOR thanks to Cmowla for helping me a lot with the coding! He deserves a whole lot of credit for what he's done. So I would like to give you due credit!


You're welcome. It was fun!

To everyone (who cares), at the moment, I have programed all of the system with the exception of tpt8899's prgmSCRAMBLE (the 3x3x3 scramble), and thus, for those who are experienced TI-BASIC programmers (or know other programming languages) and would like to suggest a better software system *structure* to either reduce code (the system's total size at the moment is approaching 11000 bytes) or increase speed (which I highly doubt is possible to do in BASIC), please either pm me or post the specific suggested structure here for discussion purposes.

However, all bug reports, new feature requests, and _other _suggestions should be reported on tpt8899's forms. (Although I won't ignore you if you send me any of these through pm.)

EDIT:
I did not program prgmVARASM (an assembly program for detecting whether a variable exists in the RAM, archive, or doesn't exist), and I did not program prgmNUMTOSTG (a program which quickly converts--this is the most efficient possible code in TI BASIC--a number L to Str5): I got them from the web. However, the rest I have programmed from scratch, and thus any suggestions on the *structure* of any of the remaining 13 sub programs or the main program (prgmRCTIME---which will be eventually renamed to prgmRCTIMER), pm me.


----------



## tpt8899 (Oct 24, 2014)

Quick update: Version 1.0.1 is out!
https://drive.google.com/file/d/0BxDeRI2ldQ09UG1MbEhPVTVXQU0/view?usp=sharing

Update: Fixed the weird screen when closing the app, as well as added scrambles for 2x2, skewb, and a glitchy Pyraminx (tips are never prime). Will fix Pyra scrambles, and work on the rest. Also added the ///s for the timing.


----------



## Christopher Mowla (Oct 27, 2014)

@tpt8899,

I assumed when you created this thread almost a year ago that you knew somewhat what you were doing, as you implied that you *had* a timer already programmed and made a poll on whether you should post your code.

Personally, now I think you saw that your TI-84 plus graphing calculator had a clock and posted the poll to debate whether or not you should begin learning coding in TI Basic. Even if this is the case, that's not a problem at all, but the rest of my post will explain why I've decided to work on my timer independently of you, should the community desire this timer to be perfected. (Footnotes are included.)




tpt8899 said:


> MAJOR thanks to Cmowla for helping me a lot with the coding! He deserves a whole lot of credit for what he's done. So I would like to give you due credit!


Why don't you just tell the community the whole truth? Saying that phrase in size 5 font will not tell the community that you only wrote about *3% *of the code in the current released version[SUP]1[/SUP] (if that...for everyone else reading who might have helped him with coding, see (*)), and *I had to rewrite that 3% of code from scratch* because the code you sent me[SUP]2[/SUP] for the timer and inspect functions were nonsensical and much longer than they needed to be.

Did you code prgmINSPECT and prgmTIME or did someone else do it for you?

(*)If someone else on the forums did code those for him, I'm just letting you know that he _forgot_ to tell me.

This might not be the case, but I don't think I can take your word on it.

I had hope that, since you wanted this to be a joint project, at least you would write code for the scrambler programs, especially since _I thought_ you did that yourself, but I just realized that you didn't program that either.

Maybe I should have re-read this thread, but when I mentioned to you that your scrambler code was "impeccable", you _forgot_ to tell me that you didn't write it? So much for giving due credit to Chree, when I wrongly assumed that you wrote it.

This tells me just how much credit you planned to give me for my 11000 bytes of code. If I would not have said anything in this and my last post, I doubt anyone would know that I basically wrote the entire timer for you.
@Chree, if you're still following this thread, and didn't view my prgms, in order to not have double white spaces between some moves and one at the end of the output string, this is how your code should be for the 3x3x3. (Oh, the "M" should be a 6...I combined all of tpt8899's scramble programs for the 2x2x2-7x7x7, skewb, and pyraminx, into one (that is, after I fixed the code) and therefore I had "M" as a variable.)





I couldn't get it any shorter or faster than this in TI Basic. Any suggestions?

@tpt8899,
It's convenient you deleted the content in the first post of this thread and replaced it with *my timer system without even mentioning my username*[SUP]3[/SUP] to cover up the truth. Why didn't you remove the poll and request a change of the title too?

If it takes me to write a post like this to motivate you to give me "due credit" when you claim to do just that, then you can tell me nothing to change my mind. *No hard feelings, just no more dealings*.

@To others,
If someone wants me to finish *my timer*, let me know by pm, and I will complete it whenever I can, but I am letting those who are following this thread know that I am officially disassociating myself and my work with tpt8899 because he is being dishonest both to me and to the community.

I wrote some impressive UI and string manipulation code for him (which makes up the majority of the current released version), and maybe he can take the time to learn the language and understand it so that he can present a real timer, but don't count on a full working system to your liking for some time, as I didn't comment my code.


Spoiler



I guess since I corrected and optimized the scrambler programs for the 2x2x2-7x7x7, skewb, pyraminx, and I wrote the megaminx scrambler and sent it to him yesterday, that will be a start for him.



* Footnotes*​ 
1. I posted a download link to the current version before he deletes or updates it.
2. Besides my prgmCURRAVG, which I originally posted the code to here, and the scrambler prgms, these are the prgms in the current released version. I am only posting this for those who are curious just how different my prgms are for prgmINSPECT and prgmTIME (which are in the current released version).


Spoiler: his prgms



*prgmINSPECT*





*prgmTIME*






3. A screenshot of the first post as of right now.


Spoiler


----------



## Torch (Oct 27, 2014)

I don't if this is exactly relevant to this thread, but I programmed a scramble generator on my Casio calculator. It generates a 25 move scramble that doesn't do moves on the same side twice in a row, or moves on the same axis three times in a row.


----------



## tpt8899 (Oct 27, 2014)

I did PM a mod/admin to have the title changed, and I have no clue on how to delete polls. I was starting to work on documentation where I would be giving due credit to all.

Also 1. I do know how to code in Basic
2. I had a less effecient timer, and that was just an improvement
3. My RAM got reset because of a buggy line that I messed up really badly on.


----------

