sending dynamic data

LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT Series

Moderators: Henry, Mods

Post Reply
MMBosstones86
LCD?
Posts: 3
Joined: Wed Dec 03, 2008 10:15 am

sending dynamic data

Post by MMBosstones86 »

I was wondering how to send dynamic data.

I'm trying to create a stopwatch with the GLK19264-7T-1U. I can output commands and data perfectly in SCI, but don't know how to create it for data that isn't get defined.

for example, I want to output x...and x changes constitently.

I know my question is kind of vague...hope someone can help.[/code]
Ray
Matrix Orbital
Matrix Orbital
Posts: 745
Joined: Thu Dec 13, 2001 4:00 pm
Location: Earth.... I think..
Contact:

Post by Ray »

That shouldn't be that hard.

Draw X and when X changes clear the area you drew X and draw the updated X?
MMBosstones86
LCD?
Posts: 3
Joined: Wed Dec 03, 2008 10:15 am

Post by MMBosstones86 »

Ray,

Thanks for the quick response. Could you elaborate on what you mean by 'Draw X'?

So say i have x = 12 and y = 43 and I want to print 12.43. In the manual it just talks about drawing pixels, lines, graphs etc.

You'll have to forgive me, i've only been programming the LCD for a few days

Thanks again
Ray
Matrix Orbital
Matrix Orbital
Posts: 745
Joined: Thu Dec 13, 2001 4:00 pm
Location: Earth.... I think..
Contact:

Post by Ray »

its really easy, if you want to display 12.43 you send 12.43 to the display easy as that :)
MMBosstones86
LCD?
Posts: 3
Joined: Wed Dec 03, 2008 10:15 am

Post by MMBosstones86 »

I have that so far, but my question is what if I don't know what x and y are, but want to print x.y for my stopwatch. do I have to make a case for every possibility?

if x == 1
print 1
else if x == 2
print 2
.
.
.

??
Ray
Matrix Orbital
Matrix Orbital
Posts: 745
Joined: Thu Dec 13, 2001 4:00 pm
Location: Earth.... I think..
Contact:

Post by Ray »

You just need to send a string to the display with whatever you want to display. How you do that is all up to you, I can tell you a huge function with 60 ifs is pretty certain not the most optimal way to do it. Although I'd love to give you a course in the foundations of programming this is way beyond the scope of this forum and there are places that do a better job at it then we ever could. I suggest you pickup a book on the language you are planning on using and go from there.
Post Reply