Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Keyboard.h>
- void setup() {
- // put your setup code here, to run once:
- pinMode(4, INPUT);
- Keyboard.begin();
- Serial.begin(9600);
- }
- void loop() {
- // put your main code here, to run repeatedly:
- if (digitalRead(4) == HIGH) {
- Keyboard.press('h');
- } else {
- Keyboard.release('h');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement