[USB]
説明
Keyboard.begin()
starts emulating a keyboard connected to a computer. To end control, use Keyboard.end().
構文
Keyboard.begin()
媒介変数
none
戻り値
nothing
例
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.print("Hello!"); } }
See also
- Keyboard.end()
- Keyboard.press()
- Keyboard.print()
- Keyboard.println()
- Keyboard.release()
- Keyboard.releaseAll()
- Keyboard.write()
Language Reference Home
86Duino のリファレンスのテキストは Arduino レファレンス を編集したもので、 Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.