A fully functional analog clock for the calculator. The XY Coordinates for the lines are stored in 4 lists. The clock self updates the position of its hands every minute and there is a digital clock at the bottom with seconds.

Pretty pointless but it was interesting to make.
Is there anyways you don't need to redraw the whole graph screen? Esp. the text at the bottom?

I know why you do it but, I'm just curious. I'm also assuming you're using a picture for the clock circle and hours? If you could eliminate the minute-ly flicker, you could afford to draw and place the clock face at start-up.
Well, I guess that I could invert the pixels that make up the previous minute whenever the time changes, but I am not sure how well that will turn out. The current ClrDraw solution at least works, but if you have a better idea I wouldn't mind you posting it.
Did you know that you can add a fifth argument to line that determines whether to draw a black or a white line? You could use this to erase lines without using ClrDraw. You can erase lines like this: Line(X1,Y1,X2,Y2,0)
I once created an analog clock once before, together with Yoshord. It even has the different timezons built-in.Smile
Anyway, I recommend taking a look to that one aswell.
http://tibasic.wikia.com/wiki/Analog_clock_%28extended%29

Edit by Merth: Added URL tags.
If we're pitching in analog clock project links, I too made one way back in the day, which uses the technique Souvik mentioned:

http://www.ticalc.org/archives/files/fileinfo/266/26696.html

If you have xLib enabled, you can get rid of the flicker entirely by writing to the screen buffer, as opposed to using the Line( command to draw everything in front of the user. Using souvik/Kerm's method, you could probably afford to update more frequently, and get a smoother, flicker-free experience.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement