How to make a 'keyboard'

Ok... I want to make a little keyboardish thing with 4 buttons and it would connect via USB and one button would send the MEDIA_PLAYPAUSE key, another would send the MEDIA_NEXT, MEDIA_PREVIOUS, and MEDIA_STOP keys... I have no clue how to do this though... Any ideas?

sort by: active | newest | oldest
1-10 of 16Next »
perkinsb1024 (author) 10 years ago
Thanks for all the feedback, but let's say I wanted to do it from scratch, coding the microcontroller using the method in explained in that "ghetto programming" instructable... does anyone have any advice on that?
It's EASY.
EXCEPT for all the ridiculous PC compatibility overhead.
perkinsb1024 (author)  VIRON10 years ago
Wow! Great link. To bad it doesn't show you how to make them. Anyway, I got a book on this, so hopefully, I'll be able to slap something out. Thanks.
Once you have buttons, you connect them in rows and columns, and connect them to pins on the microcontroller. The chat device MC did not have enough pins so I used a CD4017B chip (50 cents probably) to add more for checking all the rows. And diodes on the columns to convert to binary and save more pins. The chip in your PC keyboard is a microcontroller and it just checks all the buttons and tells the PC which one was pushed or unpushed... and it uses a crappy code, which in the old days would have been ASCII and would have made sense, but no, everything about PC's takes a really long time to do from scratch even if it's simple. If you have a lot of diodes you can make a keyboard that reads itself, except for shift buttons need to read separately. The talking keyboard used only diodes for reading itself. As simple as it gets is hook up the buttons to the pins.
Try searcing around for a HID routine for your microcontroller, for example "AVR USB HID" gave some pretty good examples for an atmel microcontroller... in fact this looks like what you are trying to do...
perkinsb1024 (author)  trialex10 years ago
YUCK! This stuff is all nasty, but I guess I'll get to work. Thanks for the help everyone, I'll post a finished instructable when (most likely if) I finish...
Yep. That's why hacking an existing USB keyboard would be the way to go. Good luck though if you give it a go from scratch - I'd certainly be interested in it!
hack124x76810 years ago
Easiest thing to use is a USB game controller, a USB numeric keypad works too. Just put in in a custom housing and solder your buttons to the appropriate contacts. If it is a keypad, the OS should recognize it right away, if it is a gamepad, you may need a driver.
xbox controller for example, I have a program/drivers for mine so I can assign buttons to any keyboard key or media buttons and also use it as a mouse.
westfw10 years ago
If you have (or can find) a cheap keyboard that has the keys you want, it is probably a relatively simple manner to extract just the controller and connect it to new buttons for the functions you want. This is explained somewhat in The Arduino Booklet

1-10 of 16Next »