//Nov 2, 2014 //Written by Julia C. and Evan N. //Using a Teensy++2.0 microcontroller to make a plug-and-play arcade controller. //Hint: don't use pin 6 during this project. #include const int buttonPinA = 5; Bounce pushbuttonA = Bounce(buttonPinA, 10); // 10 ms debounce void setup() { pinMode(buttonPinA, INPUT_PULLUP); } void loop() { if (pushbuttonA.update()) // if the input has changed { if (pushbuttonA.risingEdge()) // button was pressed (as opposed to released) { Keyboard.set_key1(KEY_A); Keyboard.send_now(); // release all the keys at the same instant Keyboard.set_key1(0); Keyboard.send_now(); } } }