Lcd.printNumber

From Pinguino-Wiki
Jump to: navigation, search

Contents

Name

lcd.printNumber

Description

Since Beta X

Syntax

void lcd.printNumber(u16 number,u8 base)
  • number = the number to write in the LCD.
  • base = the base for write the number, by default 10(decimal).

Example

void setup() {
    lcd.pins(0,1,2,3,4,5,0,0,0,0); // RS,E,D4~D8 in 4-bit mode
    lcd.begin(16,2); // 16x2 LCD
    lcd.home(); // set cursor position to 0,0, equal to
    // lcd.setCursor(0,0);
    lcd.printNumber(23,10); // writes the number 23 in base 10
}
void loop() {
}

Bugs

See also

Comments

Personal tools