Print::print

Description

size_t Print::print( T text [, int base = DEC ] )

Print::print will print stuff to the screen/image/whatever. That stuff can be a string, or a number. If it is a number you can also specify in which base to print it.

Parameters

  • T text: stuff to print
  • int base (optional): base to print in. Possible values are DEC, HEX, BIN

Returns

size_t: number of characters printed

Example

#include <Gamebuino-Meta.h>

void setup() {
  gb.begin();
}

void loop() {
  if (gb.update()) {
    gb.display.clear();

    // print "Hello World" to the screen
    gb.display.print("Hello World");

    // print 42 in hexadecimal
    gb.display.print(42, HEX);
  }
}