Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void setup() {
- // make pin 2 an input and turn on the
- // pullup resistor so it goes high unless
- // connected to ground:
- pinMode(2, INPUT_PULLUP);
- Keyboard.begin();
- }
- void loop() {
- //if the button is pressed
- if(digitalRead(2)==LOW){
- //Send hexadecimal 'F1',
- Keyboard.write(0xC2);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement