GamebuinoClassic archive

Archive of the Gamebuino Classic wiki, recovered from the Wayback Machine (capture 2017-01-13). Read-only.

gb.display.print

Description

Character map

Prints data to the screen as human-readable ASCII text. This command can take many forms. Numbers are printed using an ASCII character for each digit. Floats are similarly printed as ASCII digits, defaulting to two decimal places. Bytes are sent as a single character. Characters and strings are sent as is. For example:

An optional second parameter specifies the base (format) to use; permitted values are BIN (binary, or base 2), OCT (octal, or base 8), DEC (decimal, or base 10), HEX (hexadecimal, or base 16). For floating point numbers, this parameter specifies the number of decimal places to use. For example:

Special characters can also be printed (cf. character map on the right).

To spare RAM it's advised to pass flash-memory based strings to Serial.print() by wrapping them with F(). For example :

For setting the location to print to use gb.display.cursorX and gb.display.cursorY. After printing text/numbers, the cursor will be at the end of what was printed.

You can change the font used with gb.display.setFont.

You can change the scale of the text using gb.display.fontSize.

Syntax

gb.display.print(val);

Value

Example

See also