1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-30 16:24:09 +03:00

Merge remote-tracking branch 'arduino/master' into ide-1.5.x

Conflicts:
	build/shared/examples/01.Basics/Blink/Blink.ino
	build/shared/examples/09.USB/Keyboard/KeyboardReprogram/KeyboardReprogram.ino
	build/shared/examples/10.StarterKit/p02_SpaceshipInterface/p02_SpaceshipInterface.ino
	hardware/arduino/cores/arduino/HardwareSerial.cpp
This commit is contained in:
Cristian Maglie
2014-05-23 21:04:47 +02:00
5 changed files with 37 additions and 17 deletions

View File

@ -13,13 +13,15 @@
a final key combination (CTRL-U).
Circuit:
* Arduino Leonardo, Micro or Due
* Arduino Leonardo, Micro, Due, LilyPad USB, or Yun
* wire to connect D2 to ground.
created 5 Mar 2012
modified 29 Mar 2012
by Tom Igoe
modified 3 May 2014
by Scott Fitzgerald
This example is in the public domain
http://www.arduino.cc/en/Tutorial/KeyboardReprogram
@ -56,6 +58,18 @@ void loop() {
// wait for new window to open:
delay(1000);
// versions of the Arduino IDE after 1.5 pre-populate
// new sketches with setup() and loop() functions
// let's clear the window before typing anything new
// select all
Keyboard.press(ctrlKey);
Keyboard.press('a');
delay(500);
Keyboard.releaseAll();
// delete the selected text
Keyboard.write(KEY_BACKSPACE);
delay(500);
// Type out "blink":
Keyboard.println("void setup() {");
Keyboard.println("pinMode(13, OUTPUT);");
@ -95,3 +109,4 @@ void loop() {