Pages: [1]   Go Down
Author Topic: LCD limited with space  (Read 547 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 13
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey
I am trying to display 4 things
and I am limited with amount of space
I am using 16 x 2 LCD
0,0 is display voltage of battery ( top line)
1,0 is displaying on & off status of charging process (bottom line)

I want to use bottom line to display 3 thing and I want top one to just display voltage all the time
bottom line I want to first display if charging is on or off for few seconds
than clear that and display frequency for few seconds
than clear that display some name for few second
and repeat the cycle means go back to charging on or off and just repeat tht

please tell me if this can be done
I already have code to display all 4 thing I just need help display them all
1 by 1
thanx
Logged

Espoo, Finland
Offline Offline
God Member
*****
Karma: 7
Posts: 586
"Oops, try again..."
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I can't understand the problem. If you want to replce something on the second line, why don't you just write over it?

  lcd.setCursor(0,1); //change position to first character on the second row

Cheers,
Kari
Logged


The only law for me; Ohms Law: U=R*I       P=U*I
Note to self: "Damn! Why don't you just fix it!!!"

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 32
Posts: 4258
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

To program efficiently write the comments first, then add the code.  Here are the comments.

in loop()

Set cursor to beginning of first line
Display voltage

Set cursor to beginning of second line
Display enough spaces to cover up the name (see below)
Display charging information
Delay

Set cursor to beginning of second line
Display enough spaces to cover up the charging information
Set cursor to beginning of second line
Display frequency information
Delay

Set cursor to beginning of second line
Display enough spaces to cover up the frequency information
Set cursor to beginning of second line
Display name
Delay


Don
« Last Edit: March 26, 2011, 09:05:48 am by floresta » Logged

Pages: [1]   Go Up
Jump to: