Print LCD Text Justify from Right
hi guys,
i trying display duty cycle value 0 100, , whenever lcd prints 100 , reduce duty cycle 50, shows 500. how can either remove these zeros or format print right-justified? here excerpt of code:
the thing have been able dig use sprintf function, i'm not entirely sure how this?
any guidance?
i trying display duty cycle value 0 100, , whenever lcd prints 100 , reduce duty cycle 50, shows 500. how can either remove these zeros or format print right-justified? here excerpt of code:
code: [select]
lcd.setcursor(1, 1); // sets cursor column 0, line 1
lcd.print((val1 / 4) * 100 / 255); // prints digital pin 5 duty cycle lcd
the thing have been able dig use sprintf function, i'm not entirely sure how this?
any guidance?
change second line
lcd.print(val1 * 0.09803921568);
and how have thie input setup?
lcd.print(val1 * 0.09803921568);
and how have thie input setup?
Arduino Forum > Using Arduino > Programming Questions > Print LCD Text Justify from Right
arduino
Comments
Post a Comment