Reference.KeyboardPrintln History

Hide minor edits - Show changes to output

April 28, 2012, at 12:37 AM by Scott Fitzgerald -
Changed lines 29-46 from:
to:
(:source lang=arduino tabwidth=4:)
void setup() {
// make pin 2 an input and turn on the
// pullup resistor so it goes high unless
// connected to ground:
pinMode(2, INPUT_PULLUP);
Keyboard.begin();
}

void loop() {
//if the button is pressed
if(digitalRead(2)==LOW){
//Send the message
Keyboard.println("Hello!");
}
}
(:sourceend:)
April 27, 2012, at 10:44 PM by Scott Fitzgerald -
Changed lines 26-27 from:
int : number of bytes sent\\
\\
to:
int : number of bytes sent

!!!!Example

!!!!See Also
*[[/Reference/KeyboardBegin | Keyboard.begin]]()
*[[/Reference/KeyboardEnd | Keyboard.end]]()
*[[/Reference/KeyboardPress | Keyboard.press]]()
*[[/Reference/KeyboardPrint | Keyboard.print]]()
*[[/Reference/KeyboardRelease | Keyboard.release]]()
*[[/Reference/KeyboardReleaseAll | Keyboard.releaseAll]]()
*[[/Reference/KeyboardWrite | Keyboard.write]]()
March 28, 2012, at 09:11 PM by Scott Fitzgerald -
Changed lines 9-10 from:
Keyboard.print() must be called after initiating [[/Reference/KeyboardBegin | Keyboard.begin]]().
to:
Keyboard.println() must be called after initiating [[/Reference/KeyboardBegin | Keyboard.begin]]().
March 28, 2012, at 09:11 PM by Scott Fitzgerald -
Changed line 20 from:
character : a char or int to be sent to the computer as a keystroke, followed by newline and carriage return.
to:
character : a char or int to be sent to the computer as a keystroke, followed by newline and carriage return.\\
Changed lines 22-23 from:
//
to:
\\
March 28, 2012, at 09:10 PM by Scott Fitzgerald -
Added lines 9-10:
Keyboard.print() must be called after initiating [[/Reference/KeyboardBegin | Keyboard.begin]]().
December 07, 2011, at 01:29 AM by Scott Fitzgerald -
Changed lines 24-25 from:
int : number of bytes sent
to:
int : number of bytes sent\\
\\
November 30, 2011, at 05:55 AM by Scott Fitzgerald -
Changed lines 12-13 from:
Keyboard.println()
Keyboard.println(character)
to:
Keyboard.println()\\
Keyboard.println(character)\\
November 30, 2011, at 04:56 AM by Scott Fitzgerald -
Changed lines 20-21 from:
to:
//
November 30, 2011, at 04:56 AM by Scott Fitzgerald -
Added lines 1-23:
[[Reference/MouseKeyboard | Keyboard]]

!!Keyboard.println()

!!!!Description

Sends a keystroke to a connected computer, followed by a newline and carriage return.

WARNING: When you use the Keyboard.println() command, the Arduino takes over your keyboard! Make sure you have control before you use the command. A pushbutton to toggle the keyboard control state is effective.

!!!!Syntax
Keyboard.println()
Keyboard.println(character)
Keyboard.println(characters)

!!!!Parameters

character : a char or int to be sent to the computer as a keystroke, followed by newline and carriage return.
characters : a string to be sent to the computer as a keystroke, followed by a newline and carriage return.

!!!!Returns

int : number of bytes sent

Share