I had wanted a better way to turn pages of sheet music for years. Finally, I realized I could use an old laptop to display PDFs, and turn pages with a foot pedal. I was just starting to get ideas of how to make this around my birthday last year, and I was lucky enough to receive a foot pedal for the project.
I soldered the foot pedal to a Teensy 2.0 and started working on the firmware. I was originally planning on using two switches, one for page up and one for page down, but because I only had one pedal, I had to make it do double-duty. The firmware is based on the Teensy example firmware for a simple USB keyboard. When the switch is pressed, a 500 ms timer is started. If the switch isn't pressed again before the timer expires, a page down keypress is sent. If the switch is pressed again, a page up keypress is sent. After any keypress is sent, pressing the switch again sends the same keypress again to allow quickly navigating a long music score.
After I wrote the firmware, I noticed that the Teensy might be small enough to fit in the strain relief of the foot pedal. Sure enough, it's the perfect width to fit between the screws, putting the USB connector centered in the wire hole. I shortened the wires connecting the Teensy to the switch, and put the whole thing back together. A project well done, in a very neat and compact way.
EXCEPT: After a few months, I got annoyed by how much noise the switch made when I stomped on it. I noticed that most of that noise is from the two metal halves of the switch hitting each other at the ends of the switch's travel. I fixed that problem by gluing some strips of rubber where the metal pieces hit each other. A project fully done.