Difference between revisions of "Gb.keyboard"

From Gamebuino Wiki
Jump to: navigation, search
m (Changed title depth)
m (Example: path changed to beta branch)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:gb.keyboard}}
+
{{lowercase}}
 
__NOTOC__
 
__NOTOC__
 
== Description ==
 
== Description ==
Line 15: Line 15:
  
 
== Example ==
 
== Example ==
<pre>
+
<gistit>https://github.com/Rodot/Gamebuino/blob/beta/libraries/Gamebuino/examples/5.Reference/interface/keyboard/keyboard.ino</gistit>
#include <SPI.h>
 
#include <Gamebuino.h>
 
Gamebuino gb;
 
 
 
char text[13] = "Default text";
 
 
 
void setup(){
 
  gb.begin();
 
  gb.keyboard(text, 12);
 
}
 
 
 
void loop(){
 
  if(gb.update()){
 
    gb.display.println(F("You wrote:"));
 
    gb.display.println(text);
 
  }
 
}
 
</pre>
 
  
 
== See also ==
 
== See also ==
 
*[http://arduino.cc/en/Reference/String string (Arduino reference)]
 
*[http://arduino.cc/en/Reference/String string (Arduino reference)]

Latest revision as of 2014-09-05T22:54:33

Description

Displays a keyboard for the user to input some text.

Syntax

gb.keyboard(string, length);

Parameters

  • string (char*): the string that will receive the text written by the user.
  • length (byte): the maximum length of the text the user can input.

Returns

none

Example

See also