Author Topic: 4 low profile keys...5-pin 0.1" pitch connector to external USB?  (Read 4845 times)

0 Members and 1 Guest are viewing this topic.

Offline sylcat

  • Thread Starter
  • Posts: 32
4 low profile keys...5-pin 0.1" pitch connector to external USB?
« on: Wed, 16 September 2015, 14:31:16 »
Hello!

I'm an artist who draws on modern day tablets (surface pros, etc) and I have a specific need.
If you've seen a Cintiq Companion by Wacom (or any number of drawing tablet options) you'll note they generally come with express keys on the side to make a lot of creative workflow actions easier, specifically Undo, Hold to pan, Flip Image, etc.

Many of us opt for tablets with a wacom digitizer inside that doesn't cost the wild prices of the Cintiq line, but in doing so the express keys are sacrificed.  For the longest time I've wanted a simple set of buttons mappable as keyboard strokes with a very low footprint to attach to the left side of my tablet (or the back since the sides have very little space to offer) which would connect via usb. I read a lot online and here and it seems just getting a 1 to 4 set of external buttons that doesn't cost $100 online isn't that readily available and especially if you want to avoid something as bulky as a regular keyboard key. I've seen several hacks here as well but they all involve some electrical and soldering skills currently beyond me and are again for the great part pertaining to standard size buttons.

I've come to ask you guys if what I'm considering is possible or a pipe dream.   

Effectively this: http://www.adafruit.com/products/1332?gclid=CKT-oOOc_McCFcE2aQod1isIpA

Combined with this: http://www.ebay.com/itm/USB-A-plug-to-internal-5-pin-header-adaptor-cable-male-or-female-/331638288252

If connecting those two together and plugging it in could get a pc to recognize the button presses as keystrokes that could be mapped, I'd have exactly what I need.  So...would this function like I'm imagining?  If so, what would it take beyond plugging it in to get key one to register as "[" or "ctrl+z" ...etc? I suspect some keyboard mapping software or hard-coding if I'm that lucky in the first place but I thought I'd ask before doing anything.

I'd really appreciate the insight of this board.  Please slap me if I have devised something imbecilic.
Thank you all!

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #1 on: Wed, 16 September 2015, 15:41:00 »
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 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 :)
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline sylcat

  • Thread Starter
  • Posts: 32
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #2 on: Wed, 16 September 2015, 16:31:25 »
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 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 :)

I'd love to learn!  Right now my comprehension of the final connection flow goes: 

4 button switch -->  Teensy 2.0 --> male to male usb cable (looks like?) ---> PC

And before that I'd need to connect the Teensy 2.0 via usb cable by itself and flash a keyboard firmware. 

Is that correct?  Does it end there or is a key-mapping utility also required? I really appreciate the help!
If I can do this all and build a nice box around it I'll post videos~ :)

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #3 on: Wed, 16 September 2015, 16:56:05 »
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 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 :)
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline sylcat

  • Thread Starter
  • Posts: 32
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #4 on: Wed, 16 September 2015, 17:06:34 »
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 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 :)

Excellent!  I have a lot to go on now, thank you.  :]   One other question; the teensy board has pins all around it and they seem specifically labeled.  Are those just identifiers for user reference in the firmware or do they pertain to specific functionality?  I ask because thinking spatially, I'd want to connect the 4 button pitch connector on 4 of the back pins (directly opposite the teensy's usb jack.)  That way I can flatten them back so the unit is one long line and remove (if possible) or bend the remaining pins so it's one long thin line. The thinner I can keep it the better I can incorporate it ergonomically.

Put another way, will I be restricted to using certain pins or can I plug the 4 button's cable into any set of 4 pins surrounding the device and configure it from there?

Edit:  In fact if that is a possibility I'm not beyond ordering one without pins and soldering just the 4 pins I need on...I would be very willing to learn that if so.
« Last Edit: Wed, 16 September 2015, 17:15:34 by sylcat »

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #5 on: Wed, 16 September 2015, 18:01:13 »
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 :))
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline sylcat

  • Thread Starter
  • Posts: 32
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #6 on: Wed, 16 September 2015, 19:04:56 »
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 :))

Ahh I didn't even think to snip the wires and solder to middle spots.  Ok!  I'll probably order these parts soon and give it a go.  Thanks so much for the help!  I'll report back here later  :thumb:

Offline sylcat

  • Thread Starter
  • Posts: 32
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #7 on: Mon, 21 September 2015, 15:51:45 »
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 :))

Update!  My parts have arrived.  I've downloaded and tested the blinking light programs on the Teensy 2 as described.  I'm going to try to make sense of the coding soon, but before I do, I want to make sure I solder in the right places.  I'm pretty sure on 4 of them but the 5th (power?) I'd like some guidance.

This is where I'm thinking to make my solders: https://dl.dropboxusercontent.com/u/22083389/Projects/Teensy%20Board/Teensy2solder.png

The links to the buttons seem self explanatory and it was mentioned that those could go to any Letter/Number spot on the Teensy board. As I've never used a device like this I'm just guessing the 5th provides power for all and should go to the VCC 5volt?  I suppose it could also be for grounding, I honestly don't know if this little membrane switch needs powered.  That leads me to a second question: if it does need power and I wanted to put an entire 2nd membrane switch on this board, is there a way to do that?  Would I solder both switch's power to the vcc together? (Edit: or use the other vcc on the back of the board I guess, just looked at the underside and saw the second one.)

Please pardon my ignorance on the matter.  Thanks for the help as always!

« Last Edit: Mon, 21 September 2015, 16:14:48 by sylcat »

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #8 on: Mon, 21 September 2015, 16:33:13 »
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 :)
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline sylcat

  • Thread Starter
  • Posts: 32
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #9 on: Mon, 21 September 2015, 16:47:14 »
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 :)

Haha, I'm not much of a coder yet~  My immediate plan once the solder is done is just to load the usb keyboard firmware onto it and hopefully learn how to just make one button press do one keystroke for now as that's all I need for this first project. Though the VCC part you mentioned confused me a little.  If I'm using usb keyboard firmware I *do* have to use the VCC port? Or can I skip it entirely and just use 4 of the Letter|number ports? (or 5 if I optionally want to learn about strobing.)

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #10 on: Mon, 21 September 2015, 16:56:01 »
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:
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline sylcat

  • Thread Starter
  • Posts: 32
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #11 on: Mon, 21 September 2015, 16:58:50 »
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:

Good to know!  Ok, based on all that I'm going to skip vcc and solder the 5 wires to: F0 F1 F4 F5 F6

I'll report back when I get further along!

Offline sylcat

  • Thread Starter
  • Posts: 32
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #12 on: Thu, 24 September 2015, 17:27:20 »
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:

Another update! 

Soldering is finished! I think I did alright? First time ever but the connections seem stable so I guess we'll see.  I chose to put them all towards the back for form factor so they ended up in:  D7, D6, D4, D5, and the power line went into C7.

https://dl.dropboxusercontent.com/u/22083389/Projects/Teensy%20Board/20150924_174411.jpg

At this point, I'm not sure how to proceed. I can plug the teensy in and push programs to it.  I think I can manage compiling the usb keyboard program from the teensy site and push that to the teensy, but if I need to do any specific coding/hex editing before hand I'm going to need help. If all I need to do is load the usb keyboard program you suggested and map it with the other program you linked that might be easier but I don't want to go on from here until I know~
« Last Edit: Thu, 24 September 2015, 17:42:21 by sylcat »

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #13 on: Thu, 24 September 2015, 17:41:53 »
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 :)
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline sylcat

  • Thread Starter
  • Posts: 32
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #14 on: Thu, 24 September 2015, 17:57:07 »
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 :)

...Crap!  XD  Yeah I flubbed D6 wow haha.  If it's as easy as reheating it to pull the pin out I might move it, but honestly I don't mind if the led doesn't function for this first project.  If I let it be do I have to do anything extra in EasyAVR? 

From looking at schematics online of more complicated membranes I think I get the concept of configuring rows and columns. In a more complicated keypad with like 9 numbers I would need to configure a matrix with multiple rows and columns so key 8 for instance  might be column 2, row 3, but since this is a 4 buttons switch I just need 1 column and rows 1-4.

So I'm not confusing things here, will I need to use the usb keyboard program from here at all?  https://www.pjrc.com/teensy/usb_keyboard.html

When you say "move right to EasyAVR" does that mean I only need to configure and compile a program in EasyAVR and then push it with the Teensy Loader from pjrc, skipping that usb keyboard program entirely?

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #15 on: Thu, 24 September 2015, 18:22:31 »
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 :)
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline sylcat

  • Thread Starter
  • Posts: 32
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #16 on: Thu, 24 September 2015, 19:29:51 »
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 :)

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?

Offline neverused

  • Posts: 572
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #17 on: Thu, 24 September 2015, 19:41:31 »
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 :)

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

Offline sylcat

  • Thread Starter
  • Posts: 32
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #18 on: Thu, 24 September 2015, 21:10:23 »
You can use that as a hand wired matrix, just follow the readme

The hand-wired matrix instructions have not clarified to me how I can relate my 4 button setup to what is in front of me in Easy AVR. In AVR I see layers and macros and a grid of boxes but no clarity on how to define my 4 buttons in a column/row setup then relate my pins (B4, D7, D4, D5, C7) to those. 

This is my best guess but I just assigned keys to Layout Row1/Matrix Row 1, Layout Row 2, Matrix Row 2,  etc etc and I don't know if that's correct.  https://dl.dropboxusercontent.com/u/22083389/Projects/Teensy%20Board/matrix.png

I hate to ask for a step by step but I'm going to take away the remaining information much better if the rest of this is a "1.) do this, 2.) do this" format. I just need one action to work to finish the rest.

« Last Edit: Sat, 26 September 2015, 03:42:37 by sylcat »

Offline user 18

  • * Senior Moderator
  • Posts: 2231
  • Location: Deutschland
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #19 on: Thu, 24 September 2015, 21:17:07 »
It might be simpler to use arduino keyboard functions and a simple sketch, although I'm not sure how well the teensy supports such a thing.

https://www.arduino.cc/en/Reference/MouseKeyboard for reference
Please PM me if you are waiting on classifieds approval or have a question about the classifieds rules. | geekhack Terms of Service

Max Nighthawk x8 (MX Brown) | CM QFR (MX Blue) | CM QFR (MX Clear) | RK-9000 (MX Red) | Model M 1391401 | Model M SSK 1370475 | CM Novatouch | G80-8113 (MX Clear) | 60% (85g MX Blue) | Whitefox Aria (MX Clear) | CL-LX (MX Clear) | Mira SE (MX Clear)
Avatar by ashdenej

Offline neverused

  • Posts: 572
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #20 on: Thu, 24 September 2015, 21:17:17 »
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 I can get my kids to sleep at a reasonable hour I can look into the code for you tonight

Offline neverused

  • Posts: 572
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #21 on: Thu, 24 September 2015, 21:21:13 »
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 I can get my kids to sleep at a reasonable hour I can look into the code for you tonight
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.


Offline sylcat

  • Thread Starter
  • Posts: 32
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #22 on: Thu, 24 September 2015, 21:29:43 »
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 I can get my kids to sleep at a reasonable hour I can look into the code for you tonight
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.

Show Image


I'm not going to buy another board at this point.  I feel like I'm really close I just don't know how to finish this off. If I can get this done I can make a step by step presentation that will help a bunch of people. My current thought was to export what I have in this screencap (https://dl.dropboxusercontent.com/u/22083389/Projects/Teensy%20Board/matrix.png) and try loading it to the teesy but it says "You do not have a  key mapped to the BOOT mode. Without it you can't easily reprogram your keyboard, are you sure this is what you want?"

I don't want to brick the teensy board or something.  I thought pressing the button on the teensy board was like and over-governing "enter program mode" type of deal though, so is Easy AVR just being overly cautious? Oie..

Offline sylcat

  • Thread Starter
  • Posts: 32
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #23 on: Thu, 24 September 2015, 21:54:15 »
Well hoooolllly crap...by setting literally every grid button on Easy AVR to ctrl+z I actually got one of the buttons to perform as an undo function! Wooo!   Now I've got to figure out why that is, haha.  Still, HUGE step forward!  Thank you guys for all the info so far!

Offline neverused

  • Posts: 572
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #24 on: Thu, 24 September 2015, 22:37:39 »
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.
« Last Edit: Thu, 24 September 2015, 22:46:14 by neverused »

Offline sylcat

  • Thread Starter
  • Posts: 32
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #25 on: Thu, 24 September 2015, 22:49:39 »
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.

Offline neverused

  • Posts: 572
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #26 on: Thu, 24 September 2015, 22:53:34 »
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.
No no no don't so there, you can do so much more...


Offline sylcat

  • Thread Starter
  • Posts: 32
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #27 on: Thu, 24 September 2015, 22:55:36 »
Totally not going to stop, I caught the bug now~  This was a first foray and couldn't be happier or more grateful!  :thumb:

Offline neverused

  • Posts: 572
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #28 on: Thu, 24 September 2015, 23:03:02 »
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.

Offline neverused

  • Posts: 572
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #29 on: Thu, 24 September 2015, 23:23:19 »
Be sure to post pictures of this when it is finished and in action. I'm always interested to see the finished project.

Offline sylcat

  • Thread Starter
  • Posts: 32
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #30 on: Fri, 25 September 2015, 00:19:35 »
Be sure to post pictures of this when it is finished and in action. I'm always interested to see the finished project.

Will do!

Offline sylcat

  • Thread Starter
  • Posts: 32
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #31 on: Wed, 07 October 2015, 03:17:59 »
feature=youtu.be

 :D

Offline neverused

  • Posts: 572
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #32 on: Wed, 07 October 2015, 03:23:18 »
Very nice!

Offline sylcat

  • Thread Starter
  • Posts: 32
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #33 on: Mon, 12 October 2015, 10:16:36 »
Ok, next ambitious step...I'd now like to attach these two to the same board:

1.) http://www.amazon.com/gp/product/B00170JDZU?psc=1&redirect=true&ref_=oh_aui_detailpage_o02_s00

2.) http://www.amazon.com/gp/product/B005T83VY0?psc=1&redirect=true&ref_=oh_aui_detailpage_o01_s00

In the simplest terms I'd need the joystick to output 4 letters when moved on the axis, like up=a, right=b, down=c, left=d.  With this I should be able to map those keys to perform functions like rotating the canvas and whatnot.

The potentiometer strip I'm guessing will be the most complex by far, the eventual goal being a finger slider that zooms in and out. I suspect that will involve some wild code having to detect when the linear position of the finger goes past a certain point and translating that into incremental zoom in/out commands...

Further I'm pretty sure that the keyboard hex as it is now will have to be redone and incorporated with the other code to drive the other devices since you can only upload one hex at a time. Easy AVR is awesomein that it generates the source but I'm unsure if that will be copy/pastable into a different set of code that also drives a joystick and potentiometer.  Easy avr source comes out like

const uint8_t PROGMEM LAYERS[NUMBER_OF_LAYERS][NUMBER_OF_ROWS][NUMBER_OF_COLS] = {
{
    { HID_KEYBOARD_SC_A, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
    { HID_KEYBOARD_SC_B, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
    { HID_KEYBOARD_SC_C, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
    { HID_KEYBOARD_SC_D, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
    { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
    { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
},  then a ton of other zero'd arrays, etc etc etc

I have some specific questions before launching into this one.

1.) I suppose first and foremost, is this feasable? Can the teensy to handle all these at once like I'm thinking?
2.) The connections of the joystick look like this: https://www.adafruit.com/images/970x728/444-02.jpg Knowing that, would I wire vcc and ground to a vcc and ground on the teensy then the leftright/updown to standard slots?
3.) Can I incorporate the EasyAvr generated source by itself (like copy the code  and paste into the rest of the program that drives joystick and fingerstrip and it's done) or will the fact that it defined a keyboard matrix require that the other inputs need to be on the same matrix?
4.) Regarding the potentiometer, scrolling the mouse wheel or alt+mouse will perform metered zooming for most art programs.  That seems like the simplest path for the potentiometer to use. Does that sound logical? Would a smooth up and down input be just as obtainable?
5.) This would be pretty ambitious but since the joystick should be capable of continuous input do you guys think it could be used to smoothly pan around say a zoomed in canvas or would it be best as one right sensed input = 10% percentage of the view-port moved right?

I think with at least a few of those questions answered I can move forward in some fashion.  I really appreciate the help as always. thanks for introducing me to teensy boards too!

Offline neverused

  • Posts: 572
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #34 on: Mon, 12 October 2015, 10:32:55 »
You may save yourself some real pain by changing the analog stick to a 5 way switch. Then it's a discrete digital signal rather than a variable analog one.

Offline sylcat

  • Thread Starter
  • Posts: 32
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #35 on: Mon, 12 October 2015, 12:49:35 »
I shall indeed consider that.  I'm going for a certain feel compatible with the process of arting and I'm not sure a 5 way will fit hte bill but I'm not beyond trying it.

Of my other questions, are any answerable?

Offline SamirD

  • * Esteemed Elder
  • Posts: 1508
  • Location: HSV and SFO
  • on Buckling Springs since '88
    • http://www.huntsvillecarscene.com
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #36 on: Mon, 12 October 2015, 15:51:43 »
Wait, so why would an external keypad with mapped keys not do what the OP wanted?

Offline sylcat

  • Thread Starter
  • Posts: 32
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #37 on: Thu, 15 October 2015, 05:55:08 »
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.

On that front, would anyone be able to answer the questions above?

Offline SamirD

  • * Esteemed Elder
  • Posts: 1508
  • Location: HSV and SFO
  • on Buckling Springs since '88
    • http://www.huntsvillecarscene.com
Re: 4 low profile keys...5-pin 0.1" pitch connector to external USB?
« Reply #38 on: Thu, 15 October 2015, 13:53:27 »
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.
Ah yes, this would make more sense (and be quite slick to boot).  I hope you can get it working!