Difference between revisions of "Gb.keyboard"

From Gamebuino Wiki
Jump to: navigation, search
(page creation)
 
m (Example: path changed to beta branch)
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:gb.keyboard}}
+
{{lowercase}}
 
__NOTOC__
 
__NOTOC__
= Description =
+
== Description ==
 
Displays a keyboard for the user to input some text.
 
Displays a keyboard for the user to input some text.
  
= Syntax =
+
== Syntax ==
 
<pre>gb.keyboard(string, length);</pre>
 
<pre>gb.keyboard(string, length);</pre>
  
= Parameters =
+
== Parameters ==
 
* string (char*): the string that will receive the text written by the user.
 
* 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.
 
* length (byte): the maximum length of the text the user can input.
  
= Returns =
+
== Returns ==
 
none
 
none
  
= 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";
+
== See also ==
 
 
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 =
 
 
*[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