Tutorial.KeyboardSerial History

Hide minor edits - Show changes to output

October 31, 2012, at 09:52 PM by Scott Fitzgerald -
Changed lines 4-5 from:
This example listens for a byte coming from the serial port. When received, the Leonardo or the Due send a keystroke back to the computer. The sent keystroke is one higher than what is received, so if you send an "a" from the serial monitor, you'll receive a "b" from the Leonardo (or Due). A "1" will return a "2" and so on.
to:
This example listens for a byte coming from the serial port. When received, the board sends a keystroke back to the computer. The sent keystroke is one higher than what is received, so if you send an "a" from the serial monitor, you'll receive a "b" from the Leonardo (or Due). A "1" will return a "2" and so on.
October 31, 2012, at 09:51 PM by Scott Fitzgerald -
Changed lines 10-11 from:
* Arduino Leonardo or Arduino Due board
to:
* Arduino Leonardo, Micro, or Due board
Changed lines 18-22 from:
Connect your Leonardo or Due board to your computer with a micro-USB cable.

Once programmed, open your serial monitor and send a byte. The Leonardo will reply with a keystroke that is one number higher.

to:
Connect your board to your computer with a micro-USB cable.

Once programmed, open your serial monitor and send a byte. The Arduino will reply with a keystroke that is one number higher.

Deleted line 27:
Changed lines 29-31 from:
(:source lang=arduino tabwidth=4:)
/*
Keyboard test
to:

(:source http://arduino.cc/en/pub/code/master/build/shared/examples/09.USB/Keyboard/KeyboardSerial/KeyboardSerial.ino lang=arduino tabwidth=4:)
Deleted lines 31-64:
Reads a byte from the serial port, sends a keystroke back.
The sent keystroke is one higher than what's received, e.g.
if you send a, you get b, send A you get B, and so forth.

The circuit:
* none

created 21 Oct 2011
modified 27 Mar 2012
by Tom Igoe

This example code is in the public domain.

http://www.arduino.cc/en/Tutorial/KeyboardSerial
*/

void setup() {
// open the serial port:
Serial.begin(9600);
// initialize control over the keyboard:
Keyboard.begin();
}

void loop() {
// check for incoming serial data:
if (Serial.available() > 0) {
// read incoming serial data:
char inChar = Serial.read();
// Type the next ASCII value from what you received:
Keyboard.write(inChar+1);
}
}

(:sourceend:)
October 22, 2012, at 11:21 AM by Federico -
Changed lines 4-5 from:
This example listens for a byte coming from the serial port. When received, the Leonardo send a keystroke back to the computer. The sent keystroke is one higher than what is received, so if you send an "a" from the serial monitor, you'll receive a "b" from the Leonardo. A "1" will return a "2" and so on.
to:
This example listens for a byte coming from the serial port. When received, the Leonardo or the Due send a keystroke back to the computer. The sent keystroke is one higher than what is received, so if you send an "a" from the serial monitor, you'll receive a "b" from the Leonardo (or Due). A "1" will return a "2" and so on.
Changed lines 10-11 from:
* Arduino Leonardo board
to:
* Arduino Leonardo or Arduino Due board
Changed lines 18-19 from:
Connect your Leonardo board to your computer with a micro-USB cable.
to:
Connect your Leonardo or Due board to your computer with a micro-USB cable.
May 21, 2012, at 07:48 PM by Scott Fitzgerald -
Changed lines 30-67 from:
(:source http://arduino.cc/en/pub/code/master/build/shared/examples/9.USB(Leonardo)/Keyboard/KeyboardSerial/KeyboardSerial.ino lang=arduino tabwidth=4:)
to:
(:source lang=arduino tabwidth=4:)
/*
Keyboard test

Reads a byte from the serial port, sends a keystroke back.
The sent keystroke is one higher than what's received, e.g.
if you send a, you get b, send A you get B, and so forth.

The circuit:
* none

created 21 Oct 2011
modified 27 Mar 2012
by Tom Igoe

This example code is in the public domain.

http://www.arduino.cc/en/Tutorial/KeyboardSerial
*/

void setup() {
// open the serial port:
Serial.begin(9600);
// initialize control over the keyboard:
Keyboard.begin();
}

void loop() {
// check for incoming serial data:
if (Serial.available() > 0) {
// read incoming serial data:
char inChar = Serial.read();
// Type the next ASCII value from what you received:
Keyboard.write(inChar+1);
}
}

(:sourceend:)
May 02, 2012, at 04:14 PM by Scott Fitzgerald -
Changed line 30 from:
(:source http://arduino.cc/en/pub/code/master/build/shared/examples/9.Keyboard/KeyboardSerial/KeyboardSerial.ino lang=arduino tabwidth=4:)
to:
(:source http://arduino.cc/en/pub/code/master/build/shared/examples/9.USB(Leonardo)/Keyboard/KeyboardSerial/KeyboardSerial.ino lang=arduino tabwidth=4:)
April 27, 2012, at 06:48 PM by Scott Fitzgerald -
April 27, 2012, at 06:47 PM by Scott Fitzgerald -
Added lines 23-26:
%height=300px%[[Attach:KeyboardSerial_bb.png | Attach:KeyboardSerial_bb.png]]
[-image developed using [[http://www.fritzing.org |Fritzing]]. For more circuit examples, see the [[http://fritzing.org/projects/|Fritzing project page]] -]

Changed line 38 from:
*[[ASCIITable]]
to:
*[[ASCIITable]]
April 27, 2012, at 06:46 PM by Scott Fitzgerald -
Changed lines 6-7 from:
'''NB: When you use the Keybaord.print() command, the Arduino takes over your computer's keyboard! To insure you don't lose control of your computer while running a sketch with this function, make sure to set up a reliable control system before you call Keyboard.print(). This sketch is designed to only send a Keyboard command after the Leonardo has received a byte over the serial port.'''
to:
'''NB: When you use the Keyboard.print() command, the Arduino takes over your computer's keyboard! To insure you don't lose control of your computer while running a sketch with this function, make sure to set up a reliable control system before you call Keyboard.print(). This sketch is designed to only send a Keyboard command after the Leonardo has received a byte over the serial port.'''
Changed lines 20-22 from:
to:
Once programmed, open your serial monitor and send a byte. The Leonardo will reply with a keystroke that is one number higher.

Changed lines 33-34 from:
\\
to:
(:include LeonardoSeeAlsoInclude:)
*[[ASCIITable]]
December 07, 2011, at 01:43 AM by Scott Fitzgerald -
Changed lines 27-30 from:
to:
'''See Also'''
*[[/Reference/KeyboardWrite | Keyboard.write]]()
*[[/Reference/KeyboardPrint | Keyboard.print]]()
*[[/Reference/KeyboardPrintln | Keyboard.println]]()
December 07, 2011, at 01:17 AM by Scott Fitzgerald -
Added lines 6-7:
'''NB: When you use the Keybaord.print() command, the Arduino takes over your computer's keyboard! To insure you don't lose control of your computer while running a sketch with this function, make sure to set up a reliable control system before you call Keyboard.print(). This sketch is designed to only send a Keyboard command after the Leonardo has received a byte over the serial port.'''
November 28, 2011, at 09:07 PM by Scott Fitzgerald -
Changed line 22 from:
(:source http://arduino.cc/en/pub/code/master/libraries/Keyboard/examples/KeyboardSerial/KeyboardSerial.ino lang=arduino tabwidth=4:)
to:
(:source http://arduino.cc/en/pub/code/master/build/shared/examples/9.Keyboard/KeyboardSerial/KeyboardSerial.ino lang=arduino tabwidth=4:)
November 27, 2011, at 05:13 PM by Scott Fitzgerald -
Changed line 15 from:
'''Circuit'''
to:
'''Circuit'''\\
November 27, 2011, at 05:12 PM by Scott Fitzgerald -
Changed line 22 from:
(:source http://arduino.cc/en/pub/code/master/libraries/Keyboard/KeyboardSerial/KeyboardSerial.ino lang=arduino tabwidth=4:)
to:
(:source http://arduino.cc/en/pub/code/master/libraries/Keyboard/examples/KeyboardSerial/KeyboardSerial.ino lang=arduino tabwidth=4:)
November 19, 2011, at 06:30 PM by Scott Fitzgerald -
Changed lines 4-5 from:
Reads a byte from the serial port, sends a keystroke back. The sent keystroke is one higher than what's received, e.g. if you send a, you get b, send A you get B, and so forth.
to:
This example listens for a byte coming from the serial port. When received, the Leonardo send a keystroke back to the computer. The sent keystroke is one higher than what is received, so if you send an "a" from the serial monitor, you'll receive a "b" from the Leonardo. A "1" will return a "2" and so on.
November 19, 2011, at 06:27 PM by Scott Fitzgerald -
Added lines 1-26:
''Examples > Keyboard Library''

!!!Keyboard Serial
Reads a byte from the serial port, sends a keystroke back. The sent keystroke is one higher than what's received, e.g. if you send a, you get b, send A you get B, and so forth.

(:div class=BOM :)
'''Hardware Required'''
* Arduino Leonardo board

'''Software Required'''
*none

(:divend:)

'''Circuit'''
Connect your Leonardo board to your computer with a micro-USB cable.


'''Code'''

(:div class=code :)
(:source http://arduino.cc/en/pub/code/master/libraries/Keyboard/KeyboardSerial/KeyboardSerial.ino lang=arduino tabwidth=4:)
(:divend:)


\\

Share