Select your board (Arduino Leonardo) with corresponding Serial port and press the Upload button. Works on the Leonardo board only to simulate Open the Arduino IDE and copy-paste the following code: #include 'Keyboard.h' The Arduino sketch below sends a keyboard keystroke by pressing the pedal with your foot on digital pin 2.Īn optional second pedal can be connected to GND and digital pin 3 to send a key.Ĭonnect a (micro) USB cable between the Arduino Leonardo board and your computer. DIY projects are customizable and a lot of fun to build! The Leonardo board is equivalent to a standard HID (Human Interface Device Class) USB keyboard. There are plenty of commercial USB foot pedals available for 200 Euro's/Dollars or more. An Arduino board with HID USB keyboard support is required.A computer with Arduino IDE version 1.6 or higher installed.The Leonardo board is equivalent to a standard HID (Human Interface Device Class) USB keyboard. It can be used on Windows, Linux and Android smartphones or tables.
Adding additional pedals allows you to send more keystrokes. This project describes how to send and keys for two pedals, but you can use one pedal for one keystroke as well. Flip a page forward / backward in a PDF reader.The possibilities are endless! Some examples: When you press the pedal with your foot, a keyboard keystroke will be send to your computer, smartphone or tablet over USB. This Instructable describes how to build a USB pedal with an Arduino Leonardo board.