Advertisement
Guest User

Untitled

a guest
May 22nd, 2015
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. void setup() {
  2. // make pin 2 an input and turn on the
  3. // pullup resistor so it goes high unless
  4. // connected to ground:
  5. pinMode(2, INPUT_PULLUP);
  6. Keyboard.begin();
  7. }
  8.  
  9. void loop() {
  10. //if the button is pressed
  11. if(digitalRead(2)==LOW){
  12. //Send hexadecimal 'F1',
  13. Keyboard.write(0xC2);
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement