My first calculator program and leap into TI-BASIC is going to be a fun ride. My initial idea is to make a digital clock that looks like a LCD screen.



So I am going to start reading up on TI-BASIC and see what I can do. Feel free to ask any questions or post ideas. Help is appreciated. Some possible names floating in my head are in the poll. Don't make fun if you think they are stupid. Razz
Those small words will be hard to replicate, as well as that symbol. But those numbers will be easy. How about first start out by getting a picture of the screen size of the calc and in Paint draw what you want on the screen.

Just one, with everything you could want. It's a clock, you're likely to have one screen anyways.
I don't really mean everything in the image. That was just to reference the style.
You're also not going to be able to do grayscale in TI-Basic. And you'll have to set the clock every time you start the program on an 83+ as there's no timer.
I am hoping to do this on a TI-84+ SE. Since it is my main calculator
ParkerR wrote:
I am hoping to do this on a TI-84+ SE
Great idea, that should work well! You could use line commands, or pixel commands, or you could even do this on the homescreen!
Then you should be fine.
If you are going to implement seconds, you should probably use the homescreen or xLib, since graphscreen drawing commands are slow.
souvik1997 wrote:
If you are going to implement seconds, you should probably use the homescreen or xLib, since graphscreen drawing commands are slow.
True, but if he uses one line segment per seven-segment LCD digit, I bet he could manage to do it almost fast enough.
I thought this kind of sounded like fun, so I made something:

Here's the code: http://merthsoft.com/clock.zip
It's pretty bad. I look forward to seeing what you make, Parker Smile
Nice job, Merth, is that why you asked me about getting rows from a matrix? I look forward to seeing what ParkerR makes.
It is, but I decided against doing it that way (well, I'm still doing it that way, but I just keep the row in the matrix). For those that are interested, I use three matrices. One that is 10x7, each row being a number, and each column representing on of the lines. So, e.g. the number two is {1,0,1,1,1,0,1}. The other two are 7x4 and hold the line coordinates for the numbers in the big font and the little font. I get the number for the current time, loop through the first array's row for that number, see if I need to draw that segment, and if I do draw it based off of the coords in the second number. I think what's making it slow is the drawing more than anything else, so if I used some libs I could probably speed it up (and make it prettier), but I decided to go with pure BASIC. It would be easy enough to modify the drawing code, though, since I broke it all off into functions.
That makes sense, thanks for explaining it. Just to play Weregoose for a second:


Code:
:[[1,1,1,0,1,1,1] => N=/=4
[0,0,1,0,0,1,0] => (1.5 = abs(N-4.5))
[1,0,1,1,1,0,1] => (2 =/= abs(N-4))
[1,0,1,1,0,1,1] => (1.5 =/= abs(N-3.5))
[0,1,1,1,0,1,0] => ??
[1,1,0,1,0,1,1] => (1 =/= abs(N-4))
[1,1,0,1,1,1,1] => (N =/= 3)
[1,0,1,0,0,1,0] => ??
[1,1,1,1,1,1,1] => 1
[1,1,1,1,0,1,0  => (1 =/= abs(N-6))
→[A]

(later)

:For(N,1,7
:If [A](S,N:Then:Line([C](N,1)+I,[C](N,2)+J,[C](N,3)+I,[C](N,4)+J,0
:End
:End
Just trying to think how you could either avoid the matrix, or have only two or three matrix columns.
DShiznit wrote:
You're also not going to be able to do grayscale in TI-Basic.


Depends on how fast the refresh loop runs Razz
Qwerty.55 wrote:
DShiznit wrote:
You're also not going to be able to do grayscale in TI-Basic.


Depends on how fast the refresh loop runs Razz
If you only cared about representing minutes and hours, not seconds, you could pre-render two frames on the minute change and flip them back and forth very quickly...
*Necrobump* You should totally port this to the TI-84 Plus C Silver Edition when you get your hands on it, Merth.

merthsoft wrote:
I thought this kind of sounded like fun, so I made something:

Here's the code: http://merthsoft.com/clock.zip
It's pretty bad. I look forward to seeing what you make, Parker Smile
  
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