Joy:
Lets say just this code
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() {
lcd.begin(16, 2);
}
void loop() {
lcd.setCursor(0, 0);
lcd.print(millis()/1000);
}
This code prints the increments of numbers and as the number keeps increasing they gradually prints the next unit on the next block...
I want it to print on the extreme right, as they increase the first unit will shift to the left accordingly to display the next unit...
like when you type numbers on your phone the number gradually shifts to the rleft making space for the next number..
I think your description is confusing people (or at least me). It is not clear what you mean by
"unit", "first unit", "next unit", and "next block".
Can you give specific examples?
I'm trying to figure out if you are wanting to simply print right justified numbers or you want to
print the digits backwards and have the individual digits scroll to the left as they print the final
right justified number.
If all you want to do is print a right justified number, use sprintf() to create
the string then print the string to the display.
For that sized display, it would be something like
char buf[17];
void loop() {
sprintf(buf, "%16d", millis()/1000);
lcd.setCursor(0, 0);
lcd.print(buf);
}
--- bill