LK204-7T-1U-USB-GW menu application on linux and reading cha

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

Moderators: Henry, Mods

Post Reply
bhadra
LCD?
Posts: 3
Joined: Tue Aug 17, 2010 6:27 am

LK204-7T-1U-USB-GW menu application on linux and reading cha

Post by bhadra »

Hi,

I bought LK204-7T-1U-USB-GW,with sample applications from this link :
http://www.matrixorbital.ca/appnotes/Li ... 0Linux.pdf, from this i am able to run the sample application and display is working properly.
I am developing a menu based application using this .For this I want read the character on the lcd where cursor is pointing.my question is :
1)will is it possible to read a character from the lcd where cursor is pointing?.

2)Is there any sample application for creating menu based application ,where I need to change the parameter(like numeric value increment and decrement)?


Thanks in advance,

Regards,
~bhadraji.

Raquel
Matrix Orbital
Matrix Orbital
Posts: 796
Joined: Thu Aug 19, 2004 3:37 pm
Location: MO Office

Post by Raquel »

Hello,

Thank you for posting on the forum.

1) will is it possible to read a character from the lcd where cursor is pointing?.
No, you can not read from the display the cursor location. You will need to have a counter in your code that will hold the cursor position value as you write on the display. You can use the Clear Screen (254 / 88 ) command to clear the cursor position (top row, left most). Also you can use the Go To XY command (254 / 71 / x / y). Every time you write a single character, you will need to update your counter.

2)Is there any sample application for creating menu based application ,where I need to change the parameter(like numeric value increment and decrement)?
Unfortunately, no, we do no have a sample, but I will help you search through the forum for some code that might be helpful. People post their code here to hopefully help others. When I find one, I will post the link here.
Raquel Malinis
Design and Development
Matrix Orbital

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

Post by Ray »

Here's a menu sample I once made for another linux customer but haven't gotten around doing a full app note for. Its not exactly what you want (it toggles the GPO's instead of incrementing some value) but i'm fairly sure you'll be able to adjust it to your needs.

Greetings,
Ray
Attachments
MenuTest.cpp
(4.61 KiB) Downloaded 451 times

bhadra
LCD?
Posts: 3
Joined: Tue Aug 17, 2010 6:27 am

LK204-7T-1U-USB-GW menu application on linux and reading cha

Post by bhadra »

Hi ,

Thanks for quick replay Raquel and Ray.

Actually my requirement is like this:
Let say if I am displaying IP address:192.168.1.47(this address is we are reading from file and displaying on lcd), if I want to modify this IP address to 192.168.1.127 ,modify using keypad and store it to the file where you read from.

so ultimately we want to modify the display value using keypad and read the modified value and store it. For I want read the character value from the lcd display.

Is there possible method for my requirement using LK204-7T-1U-USB-GW?
please suggest me.

Thank you very much Ray for your sample menu application , this is helpful for my application requirement.

Thanks in advance,

Regards,
~bhadraji






















[color=#][/color]

bhadra
LCD?
Posts: 3
Joined: Tue Aug 17, 2010 6:27 am

Post by bhadra »

Hi Raquel,

1) will is it possible to read a character from the lcd where cursor is pointing?.
No, you can not read from the display the cursor location. You will need to have a counter in your code that will hold the cursor position value as you write on the display. You can use the Clear Screen (254 / 88 ) command to clear the cursor position (top row, left most). Also you can use the Go To XY command (254 / 71 / x / y). Every time you write a single character, you will need to update your counter.


As you suggest it seems to be good to use this method ,do you know any sample implementation like as you mentioned above.

Thanks for your kind help,

Regards,
~bhadraji

Raquel
Matrix Orbital
Matrix Orbital
Posts: 796
Joined: Thu Aug 19, 2004 3:37 pm
Location: MO Office

Post by Raquel »

Hi,

Sorry, with the current firmware, there is no way to read the cursor position, or the char pointed by the cursor. What I can suggest is to make sure that your code will save the data it displays on the screen.

For eg. when the user changes the digits of the IP address via the keypad, make your code reflect this change on the screen (display it). And when you do, remember what the code displayed, and perhaps get the user to confirm the change with another key press.
Raquel Malinis
Design and Development
Matrix Orbital

Clark
Matrix Orbital
Matrix Orbital
Posts: 881
Joined: Fri Aug 17, 2007 10:58 am
Location: Matrix Orbital
Contact:

Post by Clark »

Hi Bhadraji,

As Raquel has mentioned, most of the work for this idea will be done by your controller, but there are a couple more commands you may want to check out. First, the cursor commands, blinking or underline, will display the cursor on screen. Of course the display will not tell your program the location of the cursor. Second, check out read and write customer data. Again, you'll be doing all the work, but if you want, the display can save 16 bytes of information in memory which could by handy for an IP address. Again, it looks like you have all the info you need, but if you have any further questions please let us know.

Thanks,
~Troy
Troy Clark
Design & Development
Matrix Orbital

Post Reply