Author Topic: Idea for firmware generating software  (Read 5320 times)

0 Members and 1 Guest are viewing this topic.

Offline Melvang

  • Exquisite Lord of Bumfluff
  • * Maker
  • Thread Starter
  • Posts: 4398
  • Location: Waterloo, IA
  • Melvang's Desktop Customs
Idea for firmware generating software
« on: Fri, 11 April 2014, 00:00:12 »
I realize that TMK is fairly easy to use, if you have some programming knowledge and or at least a mind for it.  And there is the this wonderful piece.  But what do you do if you don't have any experience with coding or have a custom layout.  Right now there are really only two options.  Either learn/stumble your way through coding, or ask someone to help/commission someone to do it for you.

This brings me to my question.  How difficult would it be to write up something similar to the AVR piece but with a spreadsheet.  Think of it this way.  You go to the website or download the software.  In the UI there is a spread sheet with the first row and column is where you want what pins.  From here you would input the layout on your proposed keyboard for a hand wired matrix.  This would be done as it would appear electrically in the matrix.  Hit the "Go" button and bam you have the hex file to flash to your controller.

I did follow Matt3o's guide and I ended lost.  This is through no fault of Matt3o's guide in any way.  Just my lack of knowledge and understanding of the importance of syntax input.  I feel this would lend greatly to the enlightenment that a custom board of your personal layout can bring. 

From what I gathered in his guide, the only things that really need to be input is controller chip, pins of corresponding rows and columns, and what you want each key to do.

I am not asking for someone to make this, though I think it would be amazing, simply wondering how difficult it would be in reality for this to become a possibility.
OG Kishsaver, Razer Orbweaver clears and reds with blue LEDs, and Razer Naga Epic.   "Great minds crawl in the same sewer"  Uncle Rich

Offline metalliqaz

  • * Maker
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Idea for firmware generating software
« Reply #1 on: Fri, 11 April 2014, 09:58:46 »
I've thought about this several times, in order to be able to make a keymapper for direct-wired project boards.  However I've backed away from it because I want to concentrate on making something that is easy for regular people to use.

The amount of information that has to be captured is extensive.  Here is just a sampling of everything I have to line up to support new hardware:

Matrix:
What IO pins are used, and what rows/cols do they correspond to?
Are the rows/cols direct access or is there a decoder involved? (huge complexity increase)
Are they configured to read the rows or the columns?
Is the matrix configured for pull-up or pull-down?

LEDs:
What IO pins are used, and what LEDs do they correspond to?
Is each LED configured for pull-up or pull-down?
Are there backlights?

Keymap:
What is the layout of the keys?
How does the configuration of the matrix relate to the layout of the keys?  (this is a biggie)
What are the default keys for the layout?


Being able to specify all that in a spreadsheet is not trivial, and then turning that into code is perhaps too complicated to make it worth the trouble.

Offline jacobolus

  • Posts: 3661
  • Location: San Francisco, CA
Re: Idea for firmware generating software
« Reply #2 on: Sat, 12 April 2014, 04:20:02 »
What’s the advantage of using a spreadsheet, instead of, say, a text file?

I think it would be easier (and much nicer) to build a custom javascript-based GUI in a browser than to get this working in a spreadsheet, frankly.

Offline Matt3o

  • -[°_°]-
  • ** Robot Emeritus
  • Posts: 3547
  • Location: Italy
Re: Idea for firmware generating software
« Reply #3 on: Sat, 12 April 2014, 05:27:12 »
it's not horribly complex to do. I thought many times about this. Just couldn't find the time...

1) select the controller (teensy or ++)
2) select the pins used for rows and cols
3) define your keyboard matrix
4) export the source to be compiled
5) even better download the compiled firmware

Apart from time I do not have the machine power to offer an on-demand compiled firmware.

Offline swill

  • * Elevated Elder
  • Posts: 3365
  • Location: Canada eh
  • builder & enabler
    • swillkb.com
Re: Idea for firmware generating software
« Reply #4 on: Sat, 12 April 2014, 08:55:23 »
Maybe we could start with this as the UI.

http://www.keyboard-layout-editor.com/

I don't remember who wrote that, but that would be the ideal UI to start from.

Even if you enter your layouts/layers and then copy the resulting json into a different little program that builds the hex.

Maybe I could write a little converter from that json output to a tmk configuration.

Offline Melvang

  • Exquisite Lord of Bumfluff
  • * Maker
  • Thread Starter
  • Posts: 4398
  • Location: Waterloo, IA
  • Melvang's Desktop Customs
Re: Idea for firmware generating software
« Reply #5 on: Wed, 16 April 2014, 13:49:58 »
Maybe we could start with this as the UI.

http://www.keyboard-layout-editor.com/

I don't remember who wrote that, but that would be the ideal UI to start from.

Even if you enter your layouts/layers and then copy the resulting json into a different little program that builds the hex.

Maybe I could write a little converter from that json output to a tmk configuration.

This would be amazing.  I think that would be about the perfect platform to start from for the GUI perspective.
OG Kishsaver, Razer Orbweaver clears and reds with blue LEDs, and Razer Naga Epic.   "Great minds crawl in the same sewer"  Uncle Rich

Offline swill

  • * Elevated Elder
  • Posts: 3365
  • Location: Canada eh
  • builder & enabler
    • swillkb.com
Re: Idea for firmware generating software
« Reply #6 on: Wed, 16 April 2014, 15:39:34 »
Maybe we could start with this as the UI.

http://www.keyboard-layout-editor.com/

I don't remember who wrote that, but that would be the ideal UI to start from.

Even if you enter your layouts/layers and then copy the resulting json into a different little program that builds the hex.

Maybe I could write a little converter from that json output to a tmk configuration.

This would be amazing.  I think that would be about the perfect platform to start from for the GUI perspective.

Ya, I have to figure out who developed that UI so I can talk to them.

Best case scenario would be for someone to enter a small amount of additional info (so we can determine how the layout is wired) and then have a 'download hex' button in that UI.  I think that would be the holy grail... 

Not trivial, but very awesome if we can make it work...

Offline Melvang

  • Exquisite Lord of Bumfluff
  • * Maker
  • Thread Starter
  • Posts: 4398
  • Location: Waterloo, IA
  • Melvang's Desktop Customs
Re: Idea for firmware generating software
« Reply #7 on: Wed, 16 April 2014, 16:08:47 »
Maybe we could start with this as the UI.

http://www.keyboard-layout-editor.com/

I don't remember who wrote that, but that would be the ideal UI to start from.

Even if you enter your layouts/layers and then copy the resulting json into a different little program that builds the hex.

Maybe I could write a little converter from that json output to a tmk configuration.

This would be amazing.  I think that would be about the perfect platform to start from for the GUI perspective.

Ya, I have to figure out who developed that UI so I can talk to them.

Best case scenario would be for someone to enter a small amount of additional info (so we can determine how the layout is wired) and then have a 'download hex' button in that UI.  I think that would be the holy grail... 

Not trivial, but very awesome if we can make it work...

Well, according to the OP in the simple questions and answers thread that one was done by ijprest.  There is also ths one that was done by ne0phyte.  Though I don't know if any of them still frequent the site.
OG Kishsaver, Razer Orbweaver clears and reds with blue LEDs, and Razer Naga Epic.   "Great minds crawl in the same sewer"  Uncle Rich

Offline user 18

  • * Senior Moderator
  • Posts: 2231
  • Location: Deutschland
Re: Idea for firmware generating software
« Reply #8 on: Wed, 16 April 2014, 16:16:15 »
If we can't get the attention of either of those coders, I could potentially hack together some sort of UI. It might not be the prettiest thing on the planet, but it would get the job done. This seems like a really cool project, and I'd love to help out and start giving back to the community here.
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 metalliqaz

  • * Maker
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Idea for firmware generating software
« Reply #9 on: Wed, 16 April 2014, 16:23:52 »
My advice is to work out the back end first, and do the UI last.

UI is easy, but you won't know what you really want/need until you've got some technical implementation.

Offline Matt3o

  • -[°_°]-
  • ** Robot Emeritus
  • Posts: 3547
  • Location: Italy
Re: Idea for firmware generating software
« Reply #10 on: Wed, 16 April 2014, 16:27:36 »
I thought a little about this, and it's a bit more complicated than I expected. You may have a very creative matrix, it is not said that the keys are connected "straight" so you also need to tell how the keys are physically connected together.

it's a pretty nasty project :)

Offline user 18

  • * Senior Moderator
  • Posts: 2231
  • Location: Deutschland
Re: Idea for firmware generating software
« Reply #11 on: Wed, 16 April 2014, 16:33:19 »
I thought a little about this, and it's a bit more complicated than I expected. You may have a very creative matrix, it is not said that the keys are connected "straight" so you also need to tell how the keys are physically connected together.

it's a pretty nasty project :)

Emphasis mine, that seems like the really nasty bit. I personally don't have any experience working with KB firmware, so I can't really chime in there, but if I'm correct in believing that the matrix tends to be just wires (or traces on a PCB) and diodes, I can imagine a way to get that information from the user.
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 Matt3o

  • -[°_°]-
  • ** Robot Emeritus
  • Posts: 3547
  • Location: Italy
Re: Idea for firmware generating software
« Reply #12 on: Wed, 16 April 2014, 16:47:42 »
yes basically you have to connect the switches both horizontally and vertically on screen. the best would be to actually suggest the user how to connect the matrix.

Offline user 18

  • * Senior Moderator
  • Posts: 2231
  • Location: Deutschland
Re: Idea for firmware generating software
« Reply #13 on: Wed, 16 April 2014, 16:57:41 »
yes basically you have to connect the switches both horizontally and vertically on screen. the best would be to actually suggest the user how to connect the matrix.

I think I could manage to code that from an interface standpoint -- picture a layout manager with two modes -- one to design the caps, (where caps are mobile, and can be edited freely) and one to design the matrix (where the caps are translucent and fixed in place, and a matrix is laid out conceptually with two nodes on each cap (one for each pin on the switch). I do believe that doing something like that lies within the realm of my skill as a programmer, although I can't guarantee it'll be the greatest code in the world. What I can do is make it workable.


@metalliqaz: I agree that it's important to get the guts of the program working before the UI, but it's also important to know there's a feasible way to get the information. How the information comes into the back end is dictated at least on some level by how the user inputs it into the UI, so having an interplay between the two is important. Functionality should dictate form to some extent (doesn't matter how pretty it is if it doesn't work, after all), but it's important for software to be pleasing to use as well.


There could just be information I don't have because of my inexperience with keyboard firmware and such, but I don't see any reason (yet) why the interface is impossible. Just tricky to get right. I do think LEDs would be a real pain though.
« Last Edit: Wed, 16 April 2014, 16:59:49 by user 18 »
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 Melvang

  • Exquisite Lord of Bumfluff
  • * Maker
  • Thread Starter
  • Posts: 4398
  • Location: Waterloo, IA
  • Melvang's Desktop Customs
Re: Idea for firmware generating software
« Reply #14 on: Wed, 16 April 2014, 17:09:01 »
yes basically you have to connect the switches both horizontally and vertically on screen. the best would be to actually suggest the user how to connect the matrix.
I do think LEDs would be a real pain though.

I would agree here.  If this is going to move forward I would say do it in steps.  Start with just getting something small and easy working.  Say just letters and numbers, from there move to function layers and possibly some of the more exotic functions like dual role keys and leave the LED support for last.
OG Kishsaver, Razer Orbweaver clears and reds with blue LEDs, and Razer Naga Epic.   "Great minds crawl in the same sewer"  Uncle Rich

Offline user 18

  • * Senior Moderator
  • Posts: 2231
  • Location: Deutschland
Re: Idea for firmware generating software
« Reply #15 on: Wed, 16 April 2014, 17:13:57 »
Good plan. I'm in for moving forward with just basic keys and layouts for now, with a view to expanding functionality in the future pending everything not blowing up in our faces.

Melvang, are you taking the lead on this? If not, we need someone to look to for project guidance.
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 Melvang

  • Exquisite Lord of Bumfluff
  • * Maker
  • Thread Starter
  • Posts: 4398
  • Location: Waterloo, IA
  • Melvang's Desktop Customs
Re: Idea for firmware generating software
« Reply #16 on: Wed, 16 April 2014, 17:51:19 »
Good plan. I'm in for moving forward with just basic keys and layouts for now, with a view to expanding functionality in the future pending everything not blowing up in our faces.

Melvang, are you taking the lead on this? If not, we need someone to look to for project guidance.

I suppose I can but I have no idea how much help I will be, as I have no coding experience.  For an idea on how much I have used a keyboard in my current job.  I have used one twice in the last 5 years.  Both times was when my foreman couldn't navigate Outlook Express.  I do have a friend that dabbles in coding but has no formal training to my knowledge.  This is on top of the hours that I work.  Which right now is 6 days on 3 days off 12 hour days, so time I can devote to this project would be fairly minimal as well.  But if you guys really want me to lead this project I suppose I can.
OG Kishsaver, Razer Orbweaver clears and reds with blue LEDs, and Razer Naga Epic.   "Great minds crawl in the same sewer"  Uncle Rich

Offline user 18

  • * Senior Moderator
  • Posts: 2231
  • Location: Deutschland
Re: Idea for firmware generating software
« Reply #17 on: Wed, 16 April 2014, 18:08:01 »
I suppose I can but I have no idea how much help I will be, as I have no coding experience.  For an idea on how much I have used a keyboard in my current job.  I have used one twice in the last 5 years.  Both times was when my foreman couldn't navigate Outlook Express.  I do have a friend that dabbles in coding but has no formal training to my knowledge.  This is on top of the hours that I work.  Which right now is 6 days on 3 days off 12 hour days, so time I can devote to this project would be fairly minimal as well.  But if you guys really want me to lead this project I suppose I can.

I was just asking as you started the thread. In my opinion, the ideal person to lead the project would also be the person who is willing to work with the backend, as it dictates a lot of the other necessities. I can look into some of that if need be, but I don't know how well I'd be able to swing something like that. I'm a first year university student taking a minor in computer science, and I have much more of an interest in interface design and implementation than backend processing stuff. I also have no experience working with any of the boards I know get used a lot for custom projects. I think for that role we need more of an engineer, who knows how to take the data and make it work with the board or boards in question. Granted, that leaves us still looking for someone to do the hard part. Any takers?
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 Melvang

  • Exquisite Lord of Bumfluff
  • * Maker
  • Thread Starter
  • Posts: 4398
  • Location: Waterloo, IA
  • Melvang's Desktop Customs
Re: Idea for firmware generating software
« Reply #18 on: Wed, 16 April 2014, 21:56:32 »
I may not be able to help out collectively code wise but I would be willing to test the software even with my limited experience.  It would be another good test bed for my single switch PCB's. 

I also sent a message to a friend of mine to see if he might want to help out on this.  I told him I would give him a proper keyboard just for helping out with this.  It will be a bolt modded Lexmark M.
OG Kishsaver, Razer Orbweaver clears and reds with blue LEDs, and Razer Naga Epic.   "Great minds crawl in the same sewer"  Uncle Rich

Offline Matt3o

  • -[°_°]-
  • ** Robot Emeritus
  • Posts: 3547
  • Location: Italy
Re: Idea for firmware generating software
« Reply #19 on: Thu, 17 April 2014, 01:12:31 »
look what I've found in my projects folders :)


Offline Melvang

  • Exquisite Lord of Bumfluff
  • * Maker
  • Thread Starter
  • Posts: 4398
  • Location: Waterloo, IA
  • Melvang's Desktop Customs
Re: Idea for firmware generating software
« Reply #20 on: Fri, 18 April 2014, 16:46:08 »
look what I've found in my projects folders :)


That looks like it would be an awesome start for a UI.
OG Kishsaver, Razer Orbweaver clears and reds with blue LEDs, and Razer Naga Epic.   "Great minds crawl in the same sewer"  Uncle Rich