Advertisement
Guest User

Untitled

a guest
Mar 16th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #include <Keyboard.h>
  2.  
  3. const int osutapa = 10;
  4. const int osutapb = 3;
  5.  
  6. void setup() {
  7. pinMode(osutapa, INPUT_PULLUP);
  8. pinMode(osutapb, INPUT_PULLUP);
  9. Keyboard.begin();
  10. }
  11.  
  12.  
  13. void loop() {
  14.  
  15. if (digitalRead(osutapa) == LOW){
  16. Keyboard.press('z');
  17. } else {
  18. Keyboard.release('z');
  19. }
  20. if (digitalRead(osutapb) == LOW){
  21. Keyboard.press('x');
  22. } else {
  23. Keyboard.release('x');
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement