Keyboard.begin()
설명
레오나르도 또는 두에 보드와 함께 쓰면, Keyboard.begin() 이 컴퓨터에 연결된 키보드를 흉내낼 수 있다. 제어를 끝내려면, Keyboard.end().
문법
Keyboard.begin()
매개변수
- 없음
반환값
- 없음
예제 코드
#include <Keyboard.h>
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!");
}
}
더보기
- 언어 : Arduino - Keyboard
- 언어 : Keyboard.end()
- 언어 : Keyboard Modifiers
- 언어 : Keyboard.press()
- 언어 : Keyboard.print()
- 언어 : Keyboard.println()
- 언어 : Keyboard.release()
- 언어 : Keyboard.write()
※ ARDUINO BUY RECOMMENDATION
Arduino UNO R3 | |
Arduino Starter Kit |
Disclosure: Some links in this section are Amazon affiliate links. If you make a purchase through these links, we may earn a commission at no extra cost to you.
Additionally, some links direct to products from our own brand, DIYables.
Additionally, some links direct to products from our own brand, DIYables.