Author Topic: 8 key keyboard coding help  (Read 2624 times)

0 Members and 1 Guest are viewing this topic.

Offline DtEarth

  • Thread Starter
  • Posts: 11
  • Location: Philly
8 key keyboard coding help
« on: Mon, 20 June 2016, 11:57:29 »
I'm having a problem programming an 8 key keyboard. Just throwing this out there real quick before I head out to work. I'll do some more searching when I have more time later. Maybe it's something simple I'm missing. Thanks in advance.
Basically I took 8 Gateron keys, soldered them together with diodes, wiring, and such like in the many DIY keyboards I've seen on here. I connected them with a Teensy 2.0. Connected the 2 rows to pins F0 and F1 and the 8 keys to pins F2-F5 and B0-3. I can connect to the Teensy fine. The .hex files examples work fine. Like the Blinking LED. I've also tested with Adruino 1.6.8. The examples work fine there also. Serial Monitoring works too.
Basically what I'm trying to do is this layout. Minus the _ = 
http://imgur.com/y5sXy0e

For the life of me I can't get this work. It should be simple I know but not coming from a programming background it's all foreign to me.
Again thanks for any help and sorry if this is posted incorrectly.
, ,, , Rosewill RGB80, AJazz, Planck, Preonic

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: 8 key keyboard coding help
« Reply #1 on: Mon, 20 June 2016, 13:34:19 »
Diodes?  That's a bit overkill for 8 switches, you could have just wired each to a pin...

Anyway, I guess your problem is that your code is expecting the diodes to be the other way round, but without seeing the code or a pic of your wiring it's impossible to say.  More info please :)
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline DtEarth

  • Thread Starter
  • Posts: 11
  • Location: Philly
Re: 8 key keyboard coding help
« Reply #2 on: Tue, 21 June 2016, 00:20:24 »
Well everything I read and seen had diodes. I have bags of them so why not use them. I wouldn't want back flow any how. As for code that's what I'm asking for. I can't really share it if I don't have it. Most of what I've been able to find either adruino or TMK stuff all seems for 60% and above keyboards. I though maybe since it's only 8 keys it wouldn't work because the code was written for a full keyboard. I look through the code but don't really see where or what to remove. I'll read up some more in the morning as it was late the other night and in a rust this morning. I'm sure I could just use a windows key mapper but I'm a linux guy. No windows. I'm probably thinking about this in a totally wrong way. I'm sure a fresh head will make things easier.
, ,, , Rosewill RGB80, AJazz, Planck, Preonic

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: 8 key keyboard coding help
« Reply #3 on: Tue, 21 June 2016, 02:26:46 »
Fair enough, I thought you were going for DIY code but you can use any firmware.  Diodes are used when you connect the keys in a matrix but you have given each key a pin so they aren't needed.  Will still work though so no worries there.

If you don't mind it looking weird the easiest one to explain is EasyAVR - open handwire.cfg in the boards directory, change the first eight columns and first row to your pins (search for them elsewhere in the file and put the pins you deleted in the other places) then use the keys in the top corner in the keymapper to assign your keycodes.  If it doesn't work you need to change STROBE_LOW to false - this would mean your diodes are the other way round.  As the other pins will never connect all the extra keys will be scanned for but never detected.

I'm a linux guy too, you might need to install a couple of python dev packages to get EasyAVR running but nothing obscure :)
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline DtEarth

  • Thread Starter
  • Posts: 11
  • Location: Philly
Re: 8 key keyboard coding help
« Reply #4 on: Tue, 21 June 2016, 10:04:43 »
Thanks for the explanation. The diodes with use of a matrix makes sense. I take a look at EasyAVR. I'm sure I'll be back if any problems.  :))
, ,, , Rosewill RGB80, AJazz, Planck, Preonic

Offline DtEarth

  • Thread Starter
  • Posts: 11
  • Location: Philly
Re: 8 key keyboard coding help
« Reply #5 on: Thu, 23 June 2016, 09:25:28 »
When you say open handwire.cfg do you mean handwire.py? Don't see handwire.cfg in https://github.com/dhowland/EasyAVR Unless I'm in the wrong place.
, ,, , Rosewill RGB80, AJazz, Planck, Preonic

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: 8 key keyboard coding help
« Reply #6 on: Thu, 23 June 2016, 16:44:49 »
Indeed I do - shouldn't be so specific when working from memory...
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline DtEarth

  • Thread Starter
  • Posts: 11
  • Location: Philly
Re: 8 key keyboard coding help
« Reply #7 on: Fri, 24 June 2016, 15:41:19 »
Ha, It's all good. Just making sure.
, ,, , Rosewill RGB80, AJazz, Planck, Preonic