Author Topic: basic clock program for ti 84 plus  (Read 12331 times)

0 Members and 1 Guest are viewing this topic.

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: basic clock program for any ti caclulator
« Reply #15 on: January 22, 2014, 10:43:39 pm »
note this does not work for nspire series so technically not all ti calculators
While we're being technical, it should work for the 84+SE emulator that's on some Nspires ;). (Though you could argue it's not an Nspire anymore :P)

however i am having trouble getting a rom for 84 se since wabbitemu for mac does not provide the rom automatically
if u can tell me a way that would be awesome

Well, the emulator I mention is built into the Nspire OSes that have them (and is activated when you swap the keyboards).
If the Mac version of WabbitEmu is anything like the others, when you start it up for the first time (or if you find it again in the menus) it should show a dialog providing you several ways to get a ROM. By far the easiest if you don't already have one is to use the FOSS bootcode and download the OS from the internet.
Also, to avoid derailing this topic, I'd recommend creating another topic if you have any further questions.
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline The_King

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 247
  • Rating: +6/-2
  • Ⓣⓗⓔ Ⓖⓐⓜⓔ ⓍⒹ
    • View Profile
Re: basic clock program for any ti caclulator
« Reply #16 on: January 22, 2014, 11:14:24 pm »
oh yeah i was thinking of the cx emulator :P

Offline rocketTim

  • LV0 Newcomer (Next: 5)
  • Posts: 2
  • Rating: +1/-0
    • View Profile
Re: basic clock program for any ti caclulator
« Reply #17 on: January 31, 2014, 10:07:39 am »
In the past, I've programmed a clock using a sort of conversion rate to make the time graph hands on the graphing area using a line, with the x and y coordinates of the end of the hands being the cos(x) and sin(x) respectively. The entire clock is based on the unit circle.

Offline Ti-newb

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 180
  • Rating: +3/-0
    • View Profile
Re: basic clock program for any ti caclulator
« Reply #18 on: April 17, 2014, 02:43:08 am »
Well, i haven't coded for the Ti-84 in a long time, but here i go :DDD


I've always wanted to try this but i guess in the past i failed. Gave it a try now and I think this'll work: (Il go test bugs soon)

I'll do some comments with "//" to explain my code
So anything after the //THIS IS A COMMENT and should not be included in the code


EDIT1: Changed the code, should be working now. maybe i'll go make it more pretty later ;D

[/code]
Code: [Select]


ClrHome


5 -> A  //length of Hour hand (in pixels), you may adjust these numbers if you want
7 -> B   //length of Minute Hand
25 -> C  //length of Seconds Hands


DelVar D
DelVar E
DelVar I
DelVar J
DelVar N
DelVar O
DelVar Z


Circle(48,32,C+1)     //setting up the circle encompass your second hand + 1 pixel


while(getKey != 45) //press CLEAR to stop program


getTime -> L1          //puts the time in a list, L1(1) holds hour, L1(2) holds Minutes, L1(3) holds Seconds


L1(3) -> S
Line(48+D*B,32+E*B,48+D*C,32+E*C,0)        //The second hand would erase the Hour and Minute hands if ever ontop of them
cos(S*6)->E                                                     // And i didnt want to update everything everytime
sin(S*6)->D                                                     //So i just made my Seconds Hand exist starting from the endpoint of Minutes Hand                                                     
Line(48+D*B,32+E*B,48+D*C,32+E*C)


  if(S = 0 or Z = 0)                                           //Only update when Seconds reaches zero
  Then
   L1(2) -> M                                               //Minute Hand
   Line(48,32,48+I*B,32+J*B,0)
   cos(M*6)->J                                             //Calculating Position. I,J I being my X-coordinate and J being Y-coordinate
   sin(M*6)->I
   Line(48,32,48+I*B,32+J*B)
   
   L1(1) -> H                                               //Hour Hand
   Line(48,32,48+N*A,32+O*A,0)
   cos(H*15)->O                                         //Calculating Position (24 hour assumed) N being X, O being Y
   sin(H*15)->N
   Line(48,32,48+N*A,32+O*A)
   
   1->Z                                                        //Variable so Minute and Hour are updated upon start-up
  End


End

« Last Edit: April 17, 2014, 03:10:39 am by Ti-newb »

Offline theuserofallusers

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 13
  • Rating: +0/-0
    • View Profile
Re: basic clock program for any ti caclulator
« Reply #19 on: August 25, 2014, 11:54:14 am »
hey i have tried your code but it did not work all it does is draw a circle
I am the User of all users

Offline Princetonlion.tibd

  • Members
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 790
  • Rating: +3/-4
    • View Profile
Re: basic clock program for any ti caclulator
« Reply #20 on: August 25, 2014, 02:01:08 pm »
:ClrHome
:Lbl 1
:For(X,3,16)
:Output(4,X,"<what ever you want>
:For(Y,5,20)
:Output(7,Y,getTime
:Goto 1
:ClrHome

The code makes a loop that updates every time the getTime is displayed,this only shows for about 20-30 seconds and to exit it press the on button.
I don't think it works with the 83+'s. No gettime :P

Offline theuserofallusers

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 13
  • Rating: +0/-0
    • View Profile
Re: basic clock program for ti 84 plus
« Reply #21 on: August 27, 2014, 02:31:43 pm »
yea changed the title its good  :w00t:
I am the User of all users