Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #include <Keyboard.h>
  2.  
  3. void setup() {
  4. // put your setup code here, to run once:
  5. pinMode(4, INPUT);
  6. Keyboard.begin();
  7.  
  8. Serial.begin(9600);
  9. }
  10.  
  11. void loop() {
  12. // put your main code here, to run repeatedly:
  13. if (digitalRead(4) == HIGH) {
  14. Keyboard.press('h');
  15. } else {
  16. Keyboard.release('h');
  17. }
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement