Welcome to Geek Hack :)
Sadly it's not quite as easy as you hoped - USB needs a chip on both ends, one in the tablet and one in the "keyboard" no matter how small it is.
You could use those buttons with a USB microcontroller, the key specification is that you need 4 I/O pins (one for each button) and you probably want native USB to avoid hassle programming it. If you buy a controller with pins already attached you won't need to solder anything as the button's connector would slot over the pins, which could be bent flat to make it slimmer so all you'd need to do is plug in a standard USB to mini/micro cable (depending which your controller comes with)
The easy answer is to suggest a Teensy 2.0 (http://www.pjrc.com/store/teensy_pins.html) which can run many keyboard firmwares and is very easy to flash (click a button, picture instructions included :))) but it's overkill for just four keys. Still much cheaper than your $100 of-the-shelf solution though!
It really comes down to do you want to learn about this stuff and save a bit of cash or are you just in it for the end result? There's no wrong answer :)
There's no reason you can't flash it with the keypad attached (which is good if you want to change the functions later) but other than that you've got it - the Teensy uses a mini USB connector not the newer smaller (and weaker) micro found on cellphones.
For the firmware/keymapping EasyAVR (https://geekhack.org/index.php?topic=51252.0) is an easy option - you'll need to configure a row and four "columns" (even though there's only one button on each column) on pins which are next to each other according to the button's pinout, then it's just a matter of finding those locations in the mapping window and selecting what you want them to do.
You said you want to learn so I'll leave it vague - if you get stuck, ask :)
If you're using a Teensy and proper firmware you'll need to use 5 pins which are labelled [letter][number] and you want to avoid D6 on the corner as it has an LED attached. The labels are the same as the ones used in the firmware config except they all have a P in front of them.
If you want to keep it small and in a line you would be better off going pinless as the end pins aren't all usable, then you can cut and solder the wires to any "pin" along the middle of the board without using actual pins.
Just be careful you don't make it so small that you can't fit a cable into the USB port when it's against the tablet :))
If you're using a Teensy and proper firmware you'll need to use 5 pins which are labelled [letter][number] and you want to avoid D6 on the corner as it has an LED attached. The labels are the same as the ones used in the firmware config except they all have a P in front of them.
If you want to keep it small and in a line you would be better off going pinless as the end pins aren't all usable, then you can cut and solder the wires to any "pin" along the middle of the board without using actual pins.
Just be careful you don't make it so small that you can't fit a cable into the USB port when it's against the tablet :))
Great!
Switches work by letting power flow through them when pressed so they do need power, but if you're trying to understand how a keyboard matrix works the 5th wire should also be connected to a [letter][number] pin so you can turn that power on and off ("strobing" in switch matrix speak) or so you can "strobe" each other pin in turn and detect presses on the 5th.
If you're using some keyboard firmware the wire you've labelled VCC needs to be configured the other way to the rest - 1 row and 4 columns or 4 rows and 1 column (it doesn't make much difference which way you label it as you're not using diodes) just remember what you've connected where.
If you're writing the firmware yourself this won't really be an issue unless you get more buttons than you have pins as you'll probably leave the 5th pin high all the time, but you'd may as well do it properly :)
If you code it yourself you could use VCC, but if you're doing it properly or using keyboard firmware you need to use a real pin.
If you don't connect the 5th wire pressing a button won't connect anything, so nothing will happen :thumb:
If you code it yourself you could use VCC, but if you're doing it properly or using keyboard firmware you need to use a real pin.
If you don't connect the 5th wire pressing a button won't connect anything, so nothing will happen :thumb:
If you're using a Teensy and proper firmware you'll need to use 5 pins which are labelled [letter][number] and you want to avoid D6 on the corner as it has an LED attached. The labels are the same as the ones used in the firmware config except they all have a P in front of them.
If you're using a Teensy and proper firmware you'll need to use 5 pins which are labelled [letter][number] and you want to avoid D6 on the corner as it has an LED attached. The labels are the same as the ones used in the firmware config except they all have a P in front of them.
Soldering looks good but you missed the bold bit above! Unless you want to destroy/disable the onboard LED you probably want to move that wire...
Once you've done that you can either test using your buttons and the LED on D6 (there are many button/LED tutorials online) or jump straight to EasyAVR.
When it comes to EasyAVR first you'll need to configure the rows/columns to the pins you've used in the handwire config files then run easy keymap and select "handwire matrix" to map the buttons to keys. When you're done build the firmware it will generate a .hex to flash and you're done :)
D6 does strange things as it's connected to another pin via the LED, so your best option is to "reheat and remove" as you suggest. The worst you can do is break the pads for that pin but you're unlikely to use them anyway...
As to what you want to do for firmware that's up to you - the code you linked will teach you more so if you're interested go for it, but if you want complicated functions (such as if you tap button 1 it sends ctrl+c but if you hold it it changes what the other three buttons do) you will struggle to code that, while it's relatively easy in EasyAVR once you've got your head round the config files.
You can always swap later :)
You can use that as a hand wired matrix, just follow the readmeD6 does strange things as it's connected to another pin via the LED, so your best option is to "reheat and remove" as you suggest. The worst you can do is break the pads for that pin but you're unlikely to use them anyway...
As to what you want to do for firmware that's up to you - the code you linked will teach you more so if you're interested go for it, but if you want complicated functions (such as if you tap button 1 it sends ctrl+c but if you hold it it changes what the other three buttons do) you will struggle to code that, while it's relatively easy in EasyAVR once you've got your head round the config files.
You can always swap later :)
I moved D6 over to B4, I'm a numbskull!
The firmware, I'm afraid I didn't understand your response~ If I want just one keypress per button (press red, it thinks it's a keyboard sending ctrl+z) can I just use EasyAVR to do that and no other program needed?
You can use that as a hand wired matrix, just follow the readme
It's too bad you don't have the arduino bootloader on that teensy or even an arduino micro instead. I used one with the keyboard library to do just what you are referring to. It my be possible with teensyduino.If you do go the arduino micro route I can whip up the code for you in minutes. I use the one in the pic below to enter login info as a string because I'm too lazy to type it over and over.
If I can get my kids to sleep at a reasonable hour I can look into the code for you tonight
It's too bad you don't have the arduino bootloader on that teensy or even an arduino micro instead. I used one with the keyboard library to do just what you are referring to. It my be possible with teensyduino.If you do go the arduino micro route I can whip up the code for you in minutes. I use the one in the pic below to enter login info as a string because I'm too lazy to type it over and over.
If I can get my kids to sleep at a reasonable hour I can look into the code for you tonightShow Image(http://images.tapatalk-cdn.com/15/09/24/c52a625bdd2fa4704d6e517dd10e7330.jpg)
Try changing handwire_hardware.cfg to be
[PHANTOM]
ROW0=B4
ROW1=D7
ROW2=D4
ROW3=D5
ROW4=NA
ROW5=NA
COL0=C7
COL1=NA
COL2=NA
COL3=NA
... (Follow the pattern for the remain columns)
That should index from the top left corner and put it all in the first column. Obviously save a copy of the original file (which is in the .zip folder anyways) in case you need to revert back. I'm doing this all on my phone, I hope it solves your problem.
No no no don't so there, you can do so much more...Try changing handwire_hardware.cfg to be
[PHANTOM]
ROW0=B4
ROW1=D7
ROW2=D4
ROW3=D5
ROW4=NA
ROW5=NA
COL0=C7
COL1=NA
COL2=NA
COL3=NA
... (Follow the pattern for the remain columns)
That should index from the top left corner and put it all in the first column. Obviously save a copy of the original file (which is in the .zip folder anyways) in case you need to revert back. I'm doing this all on my phone, I hope it solves your problem.
I was about to ask if my solders were bad or if I needed to change something in the .cgf. That did it!
Dudes, victory. So awesome, project complete!
I love you guys. I can turn this into a tutorial for artists to build their own express keys for any device. I'll send creds back this way for all the help. BEST EVER. 100% AWESOME A+++ COOKIES PUPPIES ROCK AND ROLL.
Totally not going to stop, I caught the bug now~ This was a first foray and couldn't be happier or more grateful! :thumb:Now you can look into Matt3o's excellent guides on hand making a full keyboard. You'll want diodes for that, but everything can be explained.
Be sure to post pictures of this when it is finished and in action. I'm always interested to see the finished project.
Wait, so why would an external keypad with mapped keys not do what the OP wanted?
Ah yes, this would make more sense (and be quite slick to boot). I hope you can get it working!Wait, so why would an external keypad with mapped keys not do what the OP wanted?
It would, but not in the small profile that I'm trying to achieve. This is eventually supposed to stick to the very small space offered on the side of most tablets, not as a chunky peripheral that sits on the desk. Plus the next evolution will hopefully expand beyond just button input.