Pages: 1 [2] 3   Go Down
Author Topic: Anyone else developing a user interface (UI) on LCDs and keypads/buttons?  (Read 5041 times)
0 Members and 1 Guest are viewing this topic.
Central MN, USA
Offline Offline
Tesla Member
***
Karma: 64
Posts: 6889
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Scrolling up/down menu? With custom character 'scroll bar' on the far right column?
That's what I'd like to see/code myself smiley

Would it be scroll menu or scroll menu and scroll text display, like old-time DOS stuff?
Logged


North Yorkshire, UK
Offline Offline
Faraday Member
**
Karma: 104
Posts: 5531
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I wasn't thinking of scrolling text (horizontally) too.
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 64
Posts: 6889
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I just did a mockup of an OK dialog and Yes/No dialog. It's good on the 20X4 (should be good on 16X4) but will not be very good-looking on 16X2.
I'm also writing a lib init routine that takes lcd and buttons objects as we as lcd sizes parameters so my struct doesn't have to store them. Less space wasted but less flexible (you will have to reinitialize lib to work on a different LCD and different set of keys if you have multiple sets).

Will upload pics tonight.
Logged


Central MN, USA
Offline Offline
Tesla Member
***
Karma: 64
Posts: 6889
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

To follow up on this, I just released the latest version:

http://arduino.cc/forum/index.php/topic,62021.0.html

The videos are not very clear for the 20X4 display  smiley-sad-blue Will try videotaping again later.
Logged


'round the world...
Offline Offline
Faraday Member
**
Karma: 41
Posts: 3107
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Scrolling up/down menu? With custom character 'scroll bar' on the far right column?
That's what I'd like to see/code myself smiley

The only thing stopping that would be the size in memory to have all the user defined characters to be passed on to the LCD. :\

Ohh, sorry for not having enough time to dedicate to this. smiley-sad
Logged

Eu não sou o teu criado. Se respondo no fórum é para ajudar todos mediante a minha disponibilidade e disposição. Responder por mensagem pessoal iria contra o propósito do fórum e por isso evito-o.
Se realmente pretendes que eu te ajude por mensagem pessoal, então podemos chegar a um acordo e contrato onde me pagas pela ajuda que eu fornecer e poderás então definir os termos de confidencialidade do meu serviço. De forma contrária toda e qualquer ajuda que eu der tem de ser visível a todos os participantes do fórum (será boa ideia, veres o significado da palavra fórum).
Nota também que eu não me responsabilizo por parvoíces escritas neste espaço pelo que se vais seguir algo dito por mim, entende que o farás por tua conta e risco.

Dito isto, mensagens pessoais só se forem pessoais, ou seja, se já interagimos de alguma forma no passado ou se me pretendes convidar para uma churrascada com cerveja (paga por ti, obviamente).

North Yorkshire, UK
Offline Offline
Faraday Member
**
Karma: 104
Posts: 5531
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The only thing stopping that would be the size in memory to have all the user defined characters to be passed on to the LCD. :\
There are ways round the limited number of characters...
Logged

'round the world...
Offline Offline
Faraday Member
**
Karma: 41
Posts: 3107
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I may have not explained myself correctly... I was talking about the size in Arduino's memory to hold the user defined characters... any formulas to create those characters that avoid the use of char arrays in memory?
Logged

Eu não sou o teu criado. Se respondo no fórum é para ajudar todos mediante a minha disponibilidade e disposição. Responder por mensagem pessoal iria contra o propósito do fórum e por isso evito-o.
Se realmente pretendes que eu te ajude por mensagem pessoal, então podemos chegar a um acordo e contrato onde me pagas pela ajuda que eu fornecer e poderás então definir os termos de confidencialidade do meu serviço. De forma contrária toda e qualquer ajuda que eu der tem de ser visível a todos os participantes do fórum (será boa ideia, veres o significado da palavra fórum).
Nota também que eu não me responsabilizo por parvoíces escritas neste espaço pelo que se vais seguir algo dito por mim, entende que o farás por tua conta e risco.

Dito isto, mensagens pessoais só se forem pessoais, ou seja, se já interagimos de alguma forma no passado ou se me pretendes convidar para uma churrascada com cerveja (paga por ti, obviamente).

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 64
Posts: 6889
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, create them in PROGMEM:
Code:
PROGMEM prog_char lcd_ch0[]={ 4,14,31,64,31,31,31,31,0};// Up triangle with block
PROGMEM prog_char lcd_ch1[]={ 4,14,31,64,64,64,64,64,0};//Up triangle
PROGMEM prog_char lcd_ch2[]={31,31,31,31,64,64,64,64,0};// Top block
PROGMEM prog_char lcd_ch3[]={64,64,64,64,31,31,31,31,0};// Bottom block
PROGMEM prog_char lcd_ch4[]={64,64,64,64,64,31,14, 4,0};// Down triangle
PROGMEM prog_char lcd_ch5[]={31,31,31,31,64,31,14, 4,0};// Down triangle with block
PROGMEM const char *ch_item[] = {lcd_ch0, lcd_ch1, lcd_ch2, lcd_ch3, lcd_ch4, lcd_ch5};


I've already made a scroll bar. Please watch some videos on the link I provided. There's only enough customized characters to create a rough scroll bar though. Dynamically shoving customized chars back and forth is too much work.
Logged


'round the world...
Offline Offline
Faraday Member
**
Karma: 41
Posts: 3107
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It's still in memory, isn't it?
Logged

Eu não sou o teu criado. Se respondo no fórum é para ajudar todos mediante a minha disponibilidade e disposição. Responder por mensagem pessoal iria contra o propósito do fórum e por isso evito-o.
Se realmente pretendes que eu te ajude por mensagem pessoal, então podemos chegar a um acordo e contrato onde me pagas pela ajuda que eu fornecer e poderás então definir os termos de confidencialidade do meu serviço. De forma contrária toda e qualquer ajuda que eu der tem de ser visível a todos os participantes do fórum (será boa ideia, veres o significado da palavra fórum).
Nota também que eu não me responsabilizo por parvoíces escritas neste espaço pelo que se vais seguir algo dito por mim, entende que o farás por tua conta e risco.

Dito isto, mensagens pessoais só se forem pessoais, ou seja, se já interagimos de alguma forma no passado ou se me pretendes convidar para uma churrascada com cerveja (paga por ti, obviamente).

Guildford, UK
Offline Offline
Full Member
***
Karma: 0
Posts: 217
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It's in program memory (aka Flash) not in data memory (aka RAM), so it's still using resources but one that there is more of.
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 64
Posts: 6889
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It's still in memory, isn't it?

So what is your point? Where would you store these data?
Logged


Central MN, USA
Offline Offline
Tesla Member
***
Karma: 64
Posts: 6889
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It's in program memory (aka Flash) not in data memory (aka RAM), so it's still using resources but one that there is more of.

Besides, the SRAM character array that is used to temporarily store the customized chars is in the init function so I suppose once that function exits, the array is gone and SRAM recovered.
Logged


North Yorkshire, UK
Offline Offline
Faraday Member
**
Karma: 104
Posts: 5531
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Besides, the SRAM character array that is used to temporarily store the customized chars is in the init function so I suppose once that function exits, the array is gone and SRAM recovered.
Correct - all that's needed is initialisation of those characters and then they are stored on the LCD, a simple request for that character to be written then recalls it from the LCDs memory to write to the display.
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 64
Posts: 6889
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Just added new line to long message display so now you can start a new line in a long message display with '\n'. Didn't know that would take me so long I was dreaming about it last night and figured it out this morning.



As you can see the first two lines have "new line" symbols '\n' after the last characters. I didn't put exact space to make it look like the picture!

It was not easy for something that probably nobody will ever notice.
Logged


Germany
Offline Offline
Edison Member
*
Karma: 100
Posts: 1223
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi All

What a nice thread.
@liudr: Thanks for pointing out this thread.

So, to answer the inital question:
I currently work on a graphical user interface. It will be GPL, it is hosted here: http://code.google.com/p/m2tklib/

History:
Sept 2010: Idea came up, as an addon for my dogm128 library
Okt/Nov 2010: Research on existing user interfaces: Not much open source, not specific to embedded systems, poor documentation. Except liudr's phi-prompt lib, but at that time it only has focus on text displays.
Nov 2010: Start working...

Goals:
- Licensed under GPL
- Small memory usage, original target was ATTINY with 16KB Flash, leaving enough space for the application itself
- Widget based approach (like any other major GUI), widgets are called "elements" inside m2tklib
- Message based communication
- lib itself in C, but also C++ API (full Arduino IDE integration)
- Portable according to any inputs (including a debounce algorithm), also portable according to the number of input buttons.
- Portable according to the display output: Support for Dogm128 lib finished. LiquidCrystal works.


Status:
Not yet released something, documentation is online (mostly). If there is some interest from community of this board, i can provide a alpha release.



Oliver


« Last Edit: June 06, 2011, 06:43:50 am by olikraus » Logged

Pages: 1 [2] 3   Go Up
Jump to: