Author Topic: Easy AVR USB Keyboard Firmware and Keymapper  (Read 936058 times)

0 Members and 4 Guests are viewing this topic.

Offline Dwarlorf

  • Posts: 100
  • Location: NL
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1950 on: Wed, 31 August 2016, 03:24:03 »
I suppose  I have a wrong concept of what tap key does. I thought that tap key mode would mean I could press a key for a longer period and it would return a different result than with a normal key tap.

So for example pressing the 'q' key for a longer period would result in 'Q' instead of 'q'. (long press on the q key is shift basically)

I do understand your example and how to set it up (although its not what I was looking for) but I still don't understand what I can use tap key mode for.

Oh I see, that sounds rather useful actually.  Sadly it's not supported, but all the code you would need is in there because 'hold to do something different' is what tap key mode does - if you tap a modifier key (ctrl, shift FN etc) it will output a character, but only if you don't press another key before releasing the mod and don't hold it too long.

This is useful on really small boards to give keys two functions and full size boards which are shared with someone who expects each key to do it's standard function - they will never press ctrl and insert, so ctrl becomes a 'with mod: ctrl' standard FN and on that layer insert could be a 'toggle' FN to a colemack layer or whatever.

I'll have a look when I get some free time (hopfully tonight) but it will need some testing.

I've been thinking about this and my concept of "hold for opposite" for a while now because I had a hard time trying to figure out how to approach both regarding my 30% design. I think we can scrap the "hold for caps" concept, of course we don't have to, but I think my concept of "Hold for opposite" can replace it fully.

For those interested in these concepts (and my build) have a look here.

First I was thinking we could argue that upper case letters (capitals) could also be considered the opposite of regular letters. But then I figured that if "hold for opposite" works with split layers everybody is free to choose their own opposites anyway, whether it be capitals to letters, uppercases to their numbers or any other combination. This is also more in line with the whole concept of fully programmable keyboards. This way it wouldn't be necessary to use both "Hold for caps"and "Hold for opposite" in one keyboard.

edit: the 'only' thing you have to program is that a long press represents FNx.

What do you think?

Edit2: I just found out qmk firmware has a "hold for caps" feature. http://qmk.fm/#timer-functionality
It also has a tapdance feature which resembles the "hold for opposite" but it uses multiple key taps instead of holding the key.
« Last Edit: Wed, 31 August 2016, 04:50:27 by Dwarlorf »
  
E5XKBP10140                 GH60 Iso/Ansi hybrid, cherry mx red

Offline HannahPeach

  • Posts: 200
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1951 on: Sat, 03 September 2016, 16:41:48 »

Anybody have a quick answer for how to program Caps Lock indicator LEDs and LEDs in General with this?
I can't seem to figure it out. :(

I have found the View Thing by now, but Setting it up still doesn't make it work after reprogramming for some reason.
I'm using a smallfry Version jd40 with just the caps lack indicator LED.
« Last Edit: Sat, 03 September 2016, 17:00:57 by HannahPeach »

Offline Tactile

  • Posts: 1433
  • Location: Portland, OR
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1952 on: Sat, 03 September 2016, 17:31:05 »

Anybody have a quick answer for how to program Caps Lock indicator LEDs and LEDs in General with this?
I can't seem to figure it out. :(

I have found the View Thing by now, but Setting it up still doesn't make it work after reprogramming for some reason.
I'm using a smallfry Version jd40 with just the caps lack indicator LED.

Don't know about other keyboard code but if you take a look at the GH60 code in Hasu's code package at GitHub it includes a functioning Caps Lock light.

EDIT
Sorry, I didn't see you were using the graphical tool, I thought you were compiling from source. Just forget I said anything...  :rolleyes:
« Last Edit: Sat, 03 September 2016, 17:35:42 by Tactile »
REΛLFORCE

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1953 on: Mon, 05 September 2016, 18:43:15 »

Anybody have a quick answer for how to program Caps Lock indicator LEDs and LEDs in General with this?
I can't seem to figure it out. :(

I have found the View Thing by now, but Setting it up still doesn't make it work after reprogramming for some reason.
I'm using a smallfry Version jd40 with just the caps lack indicator LED.

That should be all you need to do - just to check the LED is definitely not dead and is connected the right way round, and you've soldered the resistor?

I think my JD40 is a Smallfry in this so I'll add an LED tomorrow and make it work then let you know how to fix it :thumb:
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1954 on: Tue, 06 September 2016, 15:42:46 »

Anybody have a quick answer for how to program Caps Lock indicator LEDs and LEDs in General with this?
I can't seem to figure it out. :(

I have found the View Thing by now, but Setting it up still doesn't make it work after reprogramming for some reason.
I'm using a smallfry Version jd40 with just the caps lack indicator LED.

That should be all you need to do - just to check the LED is definitely not dead and is connected the right way round, and you've soldered the resistor?

I think my JD40 is a Smallfry in this so I'll add an LED tomorrow and make it work then let you know how to fix it :thumb:

Well my JD40 is a Smallfry but that was a little harder than expected - everything's wrong!

Firstly the LED holes aren't connected to the circuit, you need to connect them to the pads on either side.

Then in the config it was set to use the wrong pin and to be wired to ground instead of 5v like it is - please find attached smallfryl.py which is corrected, save it in c:\users\username\.EasyAVR\boards then re-open the keymapper and it will show up as 'JD40 (Smallfry LED)' in the list.

For the record the small side of the LED guts (with the long lead) should be connected to the square pad.
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline tedk

  • Posts: 49
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1955 on: Sat, 10 September 2016, 03:15:02 »
still the same problem - tried to flash the micro bootloader (Caterina-Micro.hex), but no success. Kernel throws the usual errors. Had a thought, maybe still a fuses problem? Does the Arduino Micro Bootloader even work on the nerd60? Sorry for the long time to answer, my job eats up my time and im too tired to work on the keyboard in the evening.
Hmm... can't say I'm entirely sure on the fuses - I ran the command in the guide so assumed we were in the same place.  The NerD is just a circuit built around an atmega32u4 so I don't see why the arduino bootloader wouldn't work, unless it's the extra letters at the end...

I'm going to extract this conversation to it's own thread in the hope of attracting some AVR experts.
Anything happened since then?

This is what made me wondering (bootloader jump address):

http://www.engbedded.com/fusecalc/



Is any of the supported devices compatible with a Nerd60 converted to TMK?

I've made the config file (attached) and it compiles and outputs letter keys on an Arduino, but tedk couldn't get it to work on his NerD and neither of us really knows enough about this stuff so it's stalled.  Feel free to give it a go :)

Are there additional steps necessary to import the nerd60.py? i've put the file to "EasyAVR-master\keymapper\easykeymap\boards"

« Last Edit: Sat, 10 September 2016, 07:37:52 by tedk »

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1956 on: Sat, 10 September 2016, 04:05:28 »
[mroe]
still the same problem - tried to flash the micro bootloader (Caterina-Micro.hex), but no success. Kernel throws the usual errors. Had a thought, maybe still a fuses problem? Does the Arduino Micro Bootloader even work on the nerd60? Sorry for the long time to answer, my job eats up my time and im too tired to work on the keyboard in the evening.
Hmm... can't say I'm entirely sure on the fuses - I ran the command in the guide so assumed we were in the same place.  The NerD is just a circuit built around an atmega32u4 so I don't see why the arduino bootloader wouldn't work, unless it's the extra letters at the end...

I'm going to extract this conversation to it's own thread in the hope of attracting some AVR experts.


Is any of the supported devices compatible with a Nerd60 converted to TMK?

I've made the config file (attached) and it compiles and outputs letter keys on an Arduino, but tedk couldn't get it to work on his NerD and neither of us really knows enough about this stuff so it's stalled.  Feel free to give it a go :)
[/more]

Are there additional steps necessary to import the nerd60.py? i've put the file to "EasyAVR-master\keymapper\easykeymap\boards"

Anything happened since then?

This is what made me wondering (bootloader jump address):

http://www.engbedded.com/fusecalc/

If it's showing up in the list that bit is right, just don't put two copies in two places or who knows what will happen.

Good idea, you may well be on to something - if the arduino bootloader is a different size to the one in the guide you would need a different fuse setting.  Have a play, or I will later with my un-arduino'd arduino :))
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline tedk

  • Posts: 49
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1957 on: Sat, 10 September 2016, 07:47:44 »
fyi, i edited my post. f'ed it up in the previous edit ;)

it seems i cant select the nerd60 after i've placed the file in that mentioned directory (that was the reason i asked in the first place). it wont show up at "file -> new default layout".

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1958 on: Sat, 10 September 2016, 08:35:52 »
fyi, i edited my post. f'ed it up in the previous edit ;)

it seems i cant select the nerd60 after i've placed the file in that mentioned directory (that was the reason i asked in the first place). it wont show up at "file -> new default layout".

Oh I see... sorry, forgot where we left this as it's been a while.

The config file needs to go in c:\users\[username]\.EasyAVR\boards assuming you're in windows, then you'll need to close and re-open the keymapper and it should appear in the list.

I've just made an adapter so I can easily (un)plug my arduino from the flasher - time to get this working!

Edit:  After applying numerous fuse settings which seemed a good idea at the time I have a board which won't enter bootloader mode in Teensy or Atmel bootloader... that's enough for today :(
« Last Edit: Sat, 10 September 2016, 11:56:08 by suicidal_orange »
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline tedk

  • Posts: 49
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1959 on: Wed, 14 September 2016, 15:52:27 »
fyi, i edited my post. f'ed it up in the previous edit ;)

it seems i cant select the nerd60 after i've placed the file in that mentioned directory (that was the reason i asked in the first place). it wont show up at "file -> new default layout".

Oh I see... sorry, forgot where we left this as it's been a while.

The config file needs to go in c:\users\[username]\.EasyAVR\boards assuming you're in windows, then you'll need to close and re-open the keymapper and it should appear in the list.

I've just made an adapter so I can easily (un)plug my arduino from the flasher - time to get this working!

Edit:  After applying numerous fuse settings which seemed a good idea at the time I have a board which won't enter bootloader mode in Teensy or Atmel bootloader... that's enough for today :(

the adapter was one of my first things to do ^^
FYI, i'm trying to read the fuses from my gh60 and satan, but at least the gh60 ran into timeouts.
i will try to read the fuses on my satan friday afternoon.

have a nice week :)

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1960 on: Fri, 16 September 2016, 03:02:20 »
GH60 fuses was next on my list, one of it's design features is the lack of an ISP header so should be fun working out what goes where.  Might even require some soldering to get a reliable connection!  Let me kno if you work out the satan, I'll be looking in about 11 hours unless someone drags me out tonight.

Still need to add ISO keys after that...

Edit: So much for no header - the pins are in a row next to the spacebar switch!  Soldered on some SIP sockets and read it - seemed to take a lot longer than the Arduino...
Code: [Select]
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e9587
avrdude: reading flash memory:

Reading | ################################################## | 100% 194.79s

avrdude: writing output file "/tmp/dump1.hex"

avrdude: safemode: Fuses OK (E:F3, H:99, L:5E)

Sadly I can't write the F3, seems I need a high voltage programmer to reset the fuse :-X
« Last Edit: Fri, 16 September 2016, 15:54:32 by suicidal_orange »
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline herliplex

  • Posts: 1
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1961 on: Sat, 17 September 2016, 01:05:44 »
I'm finding it really difficult to understand the LED mapping stuff.

Here's a picture of what I'm trying to achieve with the LED mapping http://hrltz.co/13iHQ+

Should there be more options in these dropdowns?

Thanks!

Offline tedk

  • Posts: 49
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1962 on: Sat, 17 September 2016, 02:31:28 »
GH60 fuses was next on my list, one of it's design features is the lack of an ISP header so should be fun working out what goes where.  Might even require some soldering to get a reliable connection!  Let me kno if you work out the satan, I'll be looking in about 11 hours unless someone drags me out tonight.

Still need to add ISO keys after that...

Edit: So much for no header - the pins are in a row next to the spacebar switch!  Soldered on some SIP sockets and read it - seemed to take a lot longer than the Arduino...
Code: [Select]
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e9587
avrdude: reading flash memory:

Reading | ################################################## | 100% 194.79s

avrdude: writing output file "/tmp/dump1.hex"

avrdude: safemode: Fuses OK (E:F3, H:99, L:5E)

Sadly I can't write the F3, seems I need a high voltage programmer to reset the fuse :-X


What pinout do you use for the GH60?

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1963 on: Sat, 17 September 2016, 03:04:37 »
More
GH60 fuses was next on my list, one of it's design features is the lack of an ISP header so should be fun working out what goes where.  Might even require some soldering to get a reliable connection!  Let me kno if you work out the satan, I'll be looking in about 11 hours unless someone drags me out tonight.

Still need to add ISO keys after that...

Edit: So much for no header - the pins are in a row next to the spacebar switch!  Soldered on some SIP sockets and read it - seemed to take a lot longer than the Arduino...
Code: [Select]
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e9587
avrdude: reading flash memory:

Reading | ################################################## | 100% 194.79s

avrdude: writing output file "/tmp/dump1.hex"

avrdude: safemode: Fuses OK (E:F3, H:99, L:5E)

Sadly I can't write the F3, seems I need a high voltage programmer to reset the fuse :-X

What pinout do you use for the GH60?

Looking at the back of the board the six holes under the GH60 logo are below, the values I read are the same as the default on the calculator so looks legit.

GND   MISO   5v   CLK   MOSI   Reset
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1964 on: Sat, 17 September 2016, 10:43:40 »
I'm finding it really difficult to understand the LED mapping stuff.

Here's a picture of what I'm trying to achieve with the LED mapping http://hrltz.co/13iHQ+

Should there be more options in these dropdowns?

Thanks!

I hate to say this but the Satan PCB does not support lighting each key individually - it has a Caps Lock LED separate but all the other keys are either lit or not at the same time.

What you're looking at in the screenshot is a list of all the possible times the an LED could light up, then you pick which LED you want in that situation (you only have one) and finally how you would like it to light up.  In the Satan config the backlight pin is not configured as an indicator so that is missing from the list, but you can easily change that.


There may be options to do as you wish but I need to think them through before making suggestions...
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline thienhoangbr

  • Posts: 4
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1965 on: Sun, 18 September 2016, 04:08:13 »
Hello. I am Hoàng. i come from VN. I want mod 1 keyboard. I finishing design. But when working with Teensy 2.0 i can not.
i think it using matrix 14x6.
please help me firmware? and more for using keyboard.


Thanks very much.

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1966 on: Sun, 18 September 2016, 04:25:02 »
Hello. I am Hoàng. i come from VN. I want mod 1 keyboard. I finishing design. But when working with Teensy 2.0 i can not.
i think it using matrix 14x6.
please help me firmware? and more for using keyboard.
Show Image


Thanks very much.


Welcome to gh :)

There's something strange with that layout - three keys should not fit where right shift usually goes...

Other than that I would start with a 60% config then add a pin at the end the rows section for the F row - this saves you having to move all the letters down a row.  Then copy the number row section near the bottom of the config and paste it above, then change all the 0 rows to 6 to use the pin you added.

You may also need to change the bottom row depending where the keys are connected and add a key in the right shift area.

Can't say any more without a pic of the wiring or a schematic :)
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline thienhoangbr

  • Posts: 4
Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1967 on: Sun, 18 September 2016, 04:54:29 »
Welcome to gh :)

There's something strange with that layout - three keys should not fit where right shift usually goes...

Other than that I would start with a 60% config then add a pin at the end the rows section for the F row - this saves you having to move all the letters down a row.  Then copy the number row section near the bottom of the config and paste it above, then change all the 0 rows to 6 to use the pin you added.

You may also need to change the bottom row depending where the keys are connected and add a key in the right shift area.

Can't say any more without a pic of the wiring or a schematic :)


this is new design :p
i Using pin:
i using 22 pin.

From code of you i will using:

* Column pin configuration
 * col:  0   1   2   3   4   5   6   7   8   9   10  11  12  13 14 15
 * pin:   B6  B5  B4  D7  C7  C6  D3  D2  D1   D0  B7  B3  B2  B1 (pin 14 15 i dont no)
 */

* Row pin configuration
 * row: 0   1   2   3   4 5
 * pin: F0  F1  F4  F5  F6 F7
 */
are you help me?.
Are you have skype i want make friend w u.
Thanks so much


« Last Edit: Sun, 18 September 2016, 05:28:20 by suicidal_orange »

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1968 on: Sun, 18 September 2016, 06:19:29 »
Ah, looks like you've found a better match for the layout but it's in the old style config - replace the top part of the file with this and it will make more sense.  You need to replace the ??s with whatever pins they are attached to as it's a custom board so only you know this :)

Code: [Select]
# Easy AVR USB Keyboard Firmware Keymapper
# Copyright (C) 2013-2016 David Howland
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program.  If not, see <http://www.gnu.org/licenses/>.

"""Keyboard definition for the Epsilon custom keyboard."""

import easykeymap.templates.ATmega32U4_16MHz_TKL as firmware
from easykeymap.ioports import *
from easykeymap.helper import make_matrix_config

description = "Epsilon"
unique_id = "EPSILON_001"
cfg_name = "epsilon"

teensy = False
hw_boot_key = False

display_height = int(6*4)
display_width = int(16*4)

num_rows = 6
num_cols = 16

strobe_cols = False
strobe_low = False

matrix_hardware, matrix_strobe, matrix_sense = make_matrix_config(
    strobe_cols=strobe_cols,
    strobe_low=strobe_low,
    rows=[F0, F1, F4, F5, F6, F7],
    cols=[B6, B5, B4, D7, C7, C6, D3, D2, D1, D0, B7, B3, B2, B1, F2, F3 , ??, ?? ],
    device=firmware.device
)

num_leds = 3
num_ind = 3
num_bl_enab = 2
)

Sorry to say I'm not sociable enough for skype but I'm always happy to help here :thumb:
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline thienhoangbr

  • Posts: 4
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1969 on: Sun, 18 September 2016, 09:40:10 »
Ah, looks like you've found a better match for the layout but it's in the old style config - replace the top part of the file with this and it will make more sense.  You need to replace the ??s with whatever pins they are attached to as it's a custom board so only you know this :)

Code: [Select]
# Easy AVR USB Keyboard Firmware Keymapper
# Copyright (C) 2013-2016 David Howland
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program.  If not, see <http://www.gnu.org/licenses/>.

"""Keyboard definition for the Epsilon custom keyboard."""

import easykeymap.templates.ATmega32U4_16MHz_TKL as firmware
from easykeymap.ioports import *
from easykeymap.helper import make_matrix_config

description = "Epsilon"
unique_id = "EPSILON_001"
cfg_name = "epsilon"

teensy = False
hw_boot_key = False

display_height = int(6*4)
display_width = int(16*4)

num_rows = 6
num_cols = 16

strobe_cols = False
strobe_low = False

matrix_hardware, matrix_strobe, matrix_sense = make_matrix_config(
    strobe_cols=strobe_cols,
    strobe_low=strobe_low,
    rows=[F0, F1, F4, F5, F6, F7],
    cols=[B6, B5, B4, D7, C7, C6, D3, D2, D1, D0, B7, B3, B2, B1, F2, F3 , ??, ?? ],
    device=firmware.device
)

num_leds = 3
num_ind = 3
num_bl_enab = 2
)

Sorry to say I'm not sociable enough for skype but I'm always happy to help here :thumb:
ok thank very much. This is the first i hand make :p
this is my layout :p
http://www.keyboard-layout-editor.com/#/gists/f40342f9ab907b5782aa05bbc2c1dcf2
I will buy switch and begin working.
Hope are you help me program and firmware for teensy 2.0.

Thank very much.

Offline ctm

  • Posts: 424
  • Location: Seattle, WA
  • Hello, world!
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1970 on: Sat, 24 September 2016, 21:59:57 »
I flashed in a layout with dual-role space fn into my QuickFire Rapid with Frosty Flake v2. One problem I notice is that if I am typing fast, sometimes the space catches the next character. For example, I have fn(space)+k to up arrow key. Sometimes typing k after space very quickly becomes fn+k instead of space and k. Anyone else experienced a similar problem? Any thoughts on which param I should tune? Thanks!
TMK Alps64 w/ Matias Quiet Switches in KBP V60 case.
Infinity60 with SKCM Orange Switches w/ TMK.
CM Storm QRF w/ Frosty Flake controller, Cherry MX Blue Switches and TMK firmware.


Coming:
Ellipse Model F F62.

Offline FletchINKy

  • Posts: 61
  • Troy Fletcher, Kentucky USA
    • Troy Fletcher Dot Net
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1971 on: Sun, 25 September 2016, 20:46:31 »
I've done something interesting... On what amounts to a dare, I created LED assignments which included the assignments of backlights twice, and then categorized them as indicator lights.

The idea was when the backlights were off, I could still use them as indicator lights for layers and such.

It worked. I'll have a video of it up soon, but I had a few questions; EDIT: Here's the video:

Is this ok? Yes/No

When the backlights are on, and I activate an indicator of an LED not currently in use by the backlight (IE: Green backlight, and activate red backlight as an indicator of layer) the red does light up, but not with full strength, as it does when the red/green backlight is active. Same for other indicator backlight colors while backlights are active. I kinda like it because it doesn't disturb the backlight, but why is it not getting full power as an indicator light?

In general, the backlights as indicators are dimmer than the backlights. Even with no backlight active. Is this a function of the pulsing? Are indicator lights expected to be single LEDs?

I hope I haven't broken anything  ;D

Here's the code in the handwired.py file easy AVR is using for the custom board. Keep in mind I'm using one RGB strip with one pin for each color, plus the default teensy D6.
Code: [Select]
num_leds = 7
num_ind = 4
num_bl_enab = 8

led_definition = [
    ('Teensy', 'Recording'),
    ('red_bl_low', 'Recording'),
    ('green_bl_low', 'Recording'),
    ('blue_bl_low', 'Recording'),
]

led_hardware = [
    ( REF_PORTD, 6, LED_DRIVER_PULLUP ),
    ( REF_PORTD, 7, LED_DRIVER_PULLDOWN ),
    ( REF_PORTD, 4, LED_DRIVER_PULLDOWN ),
    ( REF_PORTB, 4, LED_DRIVER_PULLDOWN ),
    ( REF_PORTD, 7, LED_DRIVER_PULLDOWN ),
    ( REF_PORTD, 4, LED_DRIVER_PULLDOWN ),
    ( REF_PORTB, 4, LED_DRIVER_PULLDOWN ),
]

backlighting = True


bl_modes = [
    ( 1, 1, 1, 1, 0, 0, 0 ),
    ( 1, 1, 1, 1, 1, 1, 1 ),
    ( 1, 1, 1, 1, 1, 1, 0 ),
    ( 1, 1, 1, 1, 1, 0, 1 ),
    ( 1, 1, 1, 1, 1, 0, 0 ),
    ( 1, 1, 1, 1, 0, 1, 1 ),
    ( 1, 1, 1, 1, 0, 1, 0 ),
    ( 1, 1, 1, 1, 0, 0, 1 ),
]
« Last Edit: Sun, 25 September 2016, 21:44:09 by FletchINKy »

Offline Dwarlorf

  • Posts: 100
  • Location: NL
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1972 on: Mon, 26 September 2016, 11:47:25 »
Hi,

Windows recognizes my GH60 as 'EasyAVR Multimedia Keyboard v2.03.01 device'. I'm wondering if I can change the device name and if so what file to change. I looked around but couldn't find the right file.
  
E5XKBP10140                 GH60 Iso/Ansi hybrid, cherry mx red

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1973 on: Mon, 26 September 2016, 16:56:34 »
Hi,

Windows recognizes my GH60 as 'EasyAVR Multimedia Keyboard v2.03.01 device'. I'm wondering if I can change the device name and if so what file to change. I looked around but couldn't find the right file.

That's set in USB.h - to change it you need to compile the firmware.
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1974 on: Mon, 26 September 2016, 17:40:58 »
I've done something interesting... On what amounts to a dare, I created LED assignments which included the assignments of backlights twice, and then categorized them as indicator lights.

The idea was when the backlights were off, I could still use them as indicator lights for layers and such.

It worked. I'll have a video of it up soon, but I had a few questions; EDIT: Here's the video:

Is this ok? Yes/No

When the backlights are on, and I activate an indicator of an LED not currently in use by the backlight (IE: Green backlight, and activate red backlight as an indicator of layer) the red does light up, but not with full strength, as it does when the red/green backlight is active. Same for other indicator backlight colors while backlights are active. I kinda like it because it doesn't disturb the backlight, but why is it not getting full power as an indicator light?

In general, the backlights as indicators are dimmer than the backlights. Even with no backlight active. Is this a function of the pulsing? Are indicator lights expected to be single LEDs?

I hope I haven't broken anything  ;D

Here's the code in the handwired.py file easy AVR is using for the custom board. Keep in mind I'm using one RGB strip with one pin for each color, plus the default teensy D6.
Code: [Select]
num_leds = 7
num_ind = 4
num_bl_enab = 8

led_definition = [
    ('Teensy', 'Recording'),
    ('red_bl_low', 'Recording'),
    ('green_bl_low', 'Recording'),
    ('blue_bl_low', 'Recording'),
]

led_hardware = [
    ( REF_PORTD, 6, LED_DRIVER_PULLUP ),
    ( REF_PORTD, 7, LED_DRIVER_PULLDOWN ),
    ( REF_PORTD, 4, LED_DRIVER_PULLDOWN ),
    ( REF_PORTB, 4, LED_DRIVER_PULLDOWN ),
    ( REF_PORTD, 7, LED_DRIVER_PULLDOWN ),
    ( REF_PORTD, 4, LED_DRIVER_PULLDOWN ),
    ( REF_PORTB, 4, LED_DRIVER_PULLDOWN ),
]

backlighting = True


bl_modes = [
    ( 1, 1, 1, 1, 0, 0, 0 ),
    ( 1, 1, 1, 1, 1, 1, 1 ),
    ( 1, 1, 1, 1, 1, 1, 0 ),
    ( 1, 1, 1, 1, 1, 0, 1 ),
    ( 1, 1, 1, 1, 1, 0, 0 ),
    ( 1, 1, 1, 1, 0, 1, 1 ),
    ( 1, 1, 1, 1, 0, 1, 0 ),
    ( 1, 1, 1, 1, 0, 0, 1 ),
]

No harm done, but looking at your results it seems the first declaration of the LED has been ignored as the 1, 1, 1, 1 at the beginning of each bl_mode should mean you have white backlight the whole time, which clearly you don't!

As you've found you can set an LED used as backlight as an indicator but if it's already on due to the backlight setting it won't do anything.

I think this should give you all possible backlight colours, the Teensy LED will always be lit except in the last mode.

Code: [Select]
num_leds = 7
num_ind = 4
num_bl_enab = 9

led_definition = [
    ('Teensy', 'Recording'),
    ('red_bl_low', 'Recording'),
    ('green_bl_low', 'Recording'),
    ('blue_bl_low', 'Recording'),
]

led_hardware = [
    ( REF_PORTD, 6, LED_DRIVER_PULLUP ),
    ( REF_PORTD, 7, LED_DRIVER_PULLDOWN ),
    ( REF_PORTD, 4, LED_DRIVER_PULLDOWN ),
    ( REF_PORTB, 4, LED_DRIVER_PULLDOWN )
]

backlighting = True

bl_modes = [
    ( 1, 1, 0, 0 ),
    ( 1, 0, 1, 0 ),
    ( 1, 0, 0, 1 ),
    ( 1, 1, 1, 0 ),
    ( 1, 1, 0, 1 ),
    ( 1, 0, 1, 1 ),
    ( 1, 1, 1, 1 ),
    ( 1, 0, 0, 0 ),
    ( 0, 0, 0, 0 ),
]

As to the brightness I'm not sure but different colours have different power requirements and there's only so much power to go around.  From memory I think green is the least power hungry so makes sense that it is brightest...  Did you do calculations to chose your resistors or are they built in or ??

If you're confident that you're not exceeding the power limit test what colour white looks.


Unrelated but that hinged board is awesome - please post some pics, and if you're in doubt over LED power requirements that would be a better thread to ask in :)
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline Dwarlorf

  • Posts: 100
  • Location: NL
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1975 on: Tue, 27 September 2016, 01:11:09 »
Hi,

Windows recognizes my GH60 as 'EasyAVR Multimedia Keyboard v2.03.01 device'. I'm wondering if I can change the device name and if so what file to change. I looked around but couldn't find the right file.

That's set in USB.h - to change it you need to compile the firmware.

Hmm I couldn't find it in the file. Probably too tired from working all night.
  
E5XKBP10140                 GH60 Iso/Ansi hybrid, cherry mx red

Offline FletchINKy

  • Posts: 61
  • Troy Fletcher, Kentucky USA
    • Troy Fletcher Dot Net
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1976 on: Tue, 27 September 2016, 10:36:04 »
Unrelated but that hinged board is awesome - please post some pics, and if you're in doubt over LED power requirements that would be a better thread to ask in :)

Here's a thread for the Plico! https://geekhack.org/index.php?topic=84915.0

Offline FletchINKy

  • Posts: 61
  • Troy Fletcher, Kentucky USA
    • Troy Fletcher Dot Net
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1977 on: Fri, 07 October 2016, 21:52:18 »
I'm reading more about the damage done by key chording, and I'm curious how difficult it would be to get Easy AVR to support layer latching.

IE: Tap the layer 1 key and tap the key you want to press on layer 1, and then it switches back to layer 0 after that key is pressed.

Offline mark.wood_uk

  • Posts: 34
  • Location: Aberdeenshire, UK
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1978 on: Sat, 15 October 2016, 06:59:59 »
Hi there,
I stumbled across this just recently whilst trawling for help with the Kiibohd controller as i've been having a few problems with getting my modified Planck keyboard to work! (my complete lack of programming being the problem, not Kiibohd's repo)

As far as i can tell this keymapper is looking up to be a god send for me!
 :thumb: :thumb: Thanks for an Awesome prog!

There are a couple of little bits that i wondered if i am able to do with this though?
Firstly is it possible to add the UK variation keys like 2", 3£, '@, etc?
Secondly i'm using the GH36 default layout as my Planck layout is 5x12 not 4x12 and has 1x2 Tab & Enter and 2x1 space, I'm assuming that if i split my switch matrix to mirror the rows/columns like the GH36 when i solder and just leave 1 row unassigned in the key mapper it should work like that with no ill effects right?


Feedback:
If you were able to make custom layouts to be created in a similar fashion to 'Keyboard layout editor' I think this would become the No.1 go to firmware generator for people with little to no programming skill like myself!
Also if it saved as a modifiable scrip rather than a .dat, that way its possible for people with a little more than zero skill to tweak the final script before using the keymapper to compile it!
 

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1979 on: Sat, 15 October 2016, 07:28:13 »
Hi there,
I stumbled across this just recently whilst trawling for help with the Kiibohd controller as i've been having a few problems with getting my modified Planck keyboard to work! (my complete lack of programming being the problem, not Kiibohd's repo)

As far as i can tell this keymapper is looking up to be a god send for me!
 :thumb: :thumb: Thanks for an Awesome prog!

There are a couple of little bits that i wondered if i am able to do with this though?
Firstly is it possible to add the UK variation keys like 2", 3£, '@, etc?
Secondly i'm using the GH36 default layout as my Planck layout is 5x12 not 4x12 and has 1x2 Tab & Enter and 2x1 space, I'm assuming that if i split my switch matrix to mirror the rows/columns like the GH36 when i solder and just leave 1 row unassigned in the key mapper it should work like that with no ill effects right?


Feedback:
If you were able to make custom layouts to be created in a similar fashion to 'Keyboard layout editor' I think this would become the No.1 go to firmware generator for people with little to no programming skill like myself!
Also if it saved as a modifiable scrip rather than a .dat, that way its possible for people with a little more than zero skill to tweak the final script before using the keymapper to compile it!

Keyboards don't know they're ISO so the US labels work fine as long as you tell your OS the board is ISO, there are two NONUS_?? scancodes for the keys next to enter and left shift.

Not entirely sure what those boards matrix look like but you might want to copy a config file and tweak it :)
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline bpiphany

  • Posts: 1033
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1980 on: Sun, 16 October 2016, 04:14:44 »
Code: [Select]
avrdude: safemode: Fuses OK (E:F3, H:99, L:5E)
Sadly I can't write the F3, seems I need a high voltage programmer to reset the fuse :-X

Those look like the standard fuses on the 32u4, what are you trying to do? Exactly what isn't working?

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1981 on: Sun, 16 October 2016, 04:47:23 »
Code: [Select]
avrdude: safemode: Fuses OK (E:F3, H:99, L:5E)
Sadly I can't write the F3, seems I need a high voltage programmer to reset the fuse :-X

Those look like the standard fuses on the 32u4, what are you trying to do? Exactly what isn't working?

The problem is I have an Arduino Micro which I'm trying to convert to the standard Atmel bootloader to get EasyAVR working on a Nerd60 (I don't have a Nerd so posted the above output from my GH60 to confirm those fuses work with EasyAVR to tedk, who has the Nerd)

It seems at some point I flashed a bad fuse setting and now this  happens:

Code: [Select]
avrdude -c usbasp -p m32u4 -U efuse:w:0xf3:m -P /dev/USBasp
...
avrdude: verification error, first mismatch at byte 0x0000
         0xc3 != 0xf3
avrdude: verification error; content mismatch

avrdude: safemode: efuse changed! Was f3, and is now c3
Would you like this fuse to be changed back? [y/n]

Pressing yes results in it hanging, no leaves it as c3.

Any help would be much appreciated :thumb:
« Last Edit: Sun, 16 October 2016, 05:02:17 by suicidal_orange »
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline mark.wood_uk

  • Posts: 34
  • Location: Aberdeenshire, UK
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1982 on: Sun, 16 October 2016, 06:27:21 »
Keyboards don't know they're ISO so the US labels work fine as long as you tell your OS the board is ISO, there are two NONUS_?? scancodes for the keys next to enter and left shift.

Not entirely sure what those boards matrix look like but you might want to copy a config file and tweak it :)
Ah, yes of course, thanks for reminding me of that!

Ive tried creating a new config.cfg for a custom Planck layout and there's no joy with that as it doesn't show up in the 'load default' list at all!

So i went ahead and just modified the existing Planck.cfg with some moderate success!... however it just doesn't seem to accept an additional 5th row at all, and the 'KEY_SPACER' lines do give a space but they blank over half the key which is set as a 2u!
Can you point out where i'm going wrong and i'll try and fix it myself first?

Should be this:
150516-0

closest Keymapper cfg:
150518-1

and the config:
[MarkMod]
MAKE_KEY(0,0,4,4)
MAKE_KEY(0,1,4,4)
MAKE_KEY(0,2,4,4)
MAKE_KEY(0,3,4,4)
MAKE_KEY(0,4,4,4)
MAKE_KEY(0,5,4,4)
MAKE_KEY(0,7,4,4)
MAKE_KEY(0,8,4,4)
MAKE_KEY(0,9,4,4)
MAKE_KEY(0,10,4,4)
MAKE_KEY(0,11,4,4)

MAKE_KEY(1,0,4,8)
MAKE_KEY(1,1,4,4)
MAKE_KEY(1,2,4,4)
MAKE_KEY(1,3,4,4)
MAKE_KEY(1,4,4,4)
MAKE_KEY(1,5,4,4)
MAKE_KEY(1,6,4,4)
MAKE_KEY(1,7,4,4)
MAKE_KEY(1,8,4,4)
MAKE_KEY(1,9,4,4)
MAKE_KEY(1,10,4,4)
MAKE_KEY(1,11,4,8)

MAKE_SPACER(2,0,4)
MAKE_KEY(2,1,4,4)
MAKE_KEY(2,2,4,4)
MAKE_KEY(2,3,4,4)
MAKE_KEY(2,4,4,4)
MAKE_KEY(2,5,4,4)
MAKE_KEY(2,6,4,4)
MAKE_KEY(2,7,4,4)
MAKE_KEY(2,8,4,4)
MAKE_KEY(2,9,4,4)
MAKE_KEY(2,10,4,4)
MAKE_SPACER(2,11,4)

MAKE_KEY(3,0,4,4)
MAKE_KEY(3,1,4,4)
MAKE_KEY(3,2,4,4)
MAKE_KEY(3,3,4,4)
MAKE_KEY(3,4,4,4)
MAKE_KEY(3,5,4,4)
MAKE_KEY(3,6,4,4)
MAKE_KEY(3,7,4,4)
MAKE_KEY(3,8,4,4)
MAKE_KEY(3,9,4,4)
MAKE_KEY(3,10,4,4)
MAKE_KEY(3,11,4,4)

MAKE_KEY(4,0,4,4)
MAKE_KEY(4,1,4,4)
MAKE_KEY(4,2,4,4)
MAKE_KEY(4,3,4,4)
MAKE_KEY(4,4,4,4)
MAKE_KEY(4,5,8,4)
MAKE_KEY(4,7,4,4)
MAKE_KEY(4,8,4,4)
MAKE_KEY(4,9,4,4)
MAKE_KEY(4,10,4,4)
MAKE_KEY(4,11,4,4)
« Last Edit: Sun, 16 October 2016, 07:15:01 by mark.wood_uk »

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1983 on: Sun, 16 October 2016, 07:31:44 »
The problem is you're in the wrong file - you need to change the .py file in the boards directory.  The .cfg file is used to make adjustments so you can hide keys (as you've discovered :))) but you can't add new ones.

I'll say no more as you want to learn...
« Last Edit: Sun, 16 October 2016, 08:09:47 by suicidal_orange »
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline a-c

  • Posts: 196
  • Location: USA
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1984 on: Sun, 16 October 2016, 11:08:34 »

Code: [Select]
avrdude -c usbasp -p m32u4 -U efuse:w:0xf3:m -P /dev/USBasp
...
avrdude: verification error, first mismatch at byte 0x0000
         0xc3 != 0xf3
avrdude: verification error; content mismatch

avrdude: safemode: efuse changed! Was f3, and is now c3
Would you like this fuse to be changed back? [y/n]

Pressing yes results in it hanging, no leaves it as c3.

Any help would be much appreciated :thumb:

That's normal. Just pick No. The efuse does not use all the bits and avrdude gets confused when reading it back. http://www.avrfreaks.net/comment/1195856#comment-1195856

You will have a problem with the Arduino Micro. The HWB pin is pulled low which affects how the bootloader is triggered. Boards running the Atmel DFU bootloader have HWB pulled high.

Offline mark.wood_uk

  • Posts: 34
  • Location: Aberdeenshire, UK
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1985 on: Sun, 16 October 2016, 11:20:54 »
The problem is you're in the wrong file - you need to change the .py file in the boards directory.  The .cfg file is used to make adjustments so you can hide keys (as you've discovered :))) but you can't add new ones.

I'll say no more as you want to learn...
yep, lol. I had kinda clocked on that the .cfg was only to 'adjust' what is visible in the gui...

Whilst i was waiting on Python to download i was having a mooch round the directories and found tucked away in 'Libraries.zip/easykeymapper/boards/'  Planck.pyc  but as far as i can figure .pyc is compiled and according to the google box its not yet possible to de-compile above 2.5 as yet?

However it has just this moment occurred that i'm trying to mess around with a file that has not yet been extracted (which generally screws things up anyway *slaps head*)
So i'll get those files extracted now and try some more fiddling about!

Ps. I kinda gave up on the Teensy 3.2 route and ordered a couple of 2.0's instead, so don't worry i'm fully aware this is for AVR and not ARM chips!
So i have 1 unused 3.2 and one that's just been de-soldered if anyone is interested!

Edit:
Un-edit
« Last Edit: Sun, 16 October 2016, 11:35:34 by mark.wood_uk »

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1986 on: Sun, 16 October 2016, 11:32:08 »
Ah, windows binary version!

You'll need to get the .py from here, rename it, and save it in c:\users\[your username]\EasyAVR\boards then open it in notepad and change the name at the top.
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline mark.wood_uk

  • Posts: 34
  • Location: Aberdeenshire, UK
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1987 on: Sun, 16 October 2016, 11:38:02 »
Ahhh, Thanks  :thumb:

Sorry, forgot to mention ive gone back ti Win with this... i was having problems getting keymapper to compile in Ubuntu!
I'm fairly noob with Terminal and nearly a non starter in C

Edit:
Mostly sorted!
150563-0
When i remove the labeled line from the .py it seems to move everything 1 step to the left on the 2nd row... is that now what i should use the the .cfg to rectify?

 ((4, 8), (1, 11), 'HID_KEYBOARD_SC_APOSTROPHE_AND_QUOTE')],

    [((4, 4), (2, 0), 'HID_KEYBOARD_SC_Z'), ### --THIS LINE-- ###
     ((4, 4), (2, 1), 'HID_KEYBOARD_SC_Z'),
     ((4, 4), (2, 2), 'HID_KEYBOARD_SC_X'),
     ((4, 4), (2, 3), 'HID_KEYBOARD_SC_C'),
     ((4, 4), (2, 4), 'HID_KEYBOARD_SC_V'),
     ((4, 4), (2, 5), 'HID_KEYBOARD_SC_B'),
     ((4, 4), (2, 6), 'HID_KEYBOARD_SC_N'),
     ((4, 4), (2, 7), 'HID_KEYBOARD_SC_M'),
     ((4, 4), (2, 8), 'HID_KEYBOARD_SC_COMMA_AND_LESS_THAN_SIGN'),
     ((4, 4), (2, 9), 'HID_KEYBOARD_SC_DOT_AND_GREATER_THAN_SIGN'),
     ((4, 4), (2, 10), 'HID_KEYBOARD_SC_SLASH_AND_QUESTION_MARK')],

Also, I altered a few bits at the beginning of the .py (which seemed to make sense to me) was i correct to do this?

description = "MarkPlanck"     ##Changed-default layout name in the keymapper##
unique_id = "PLANCK_002"    ##Changed from PLANCK_001##
cfg_name = "planck2"           ##Changed from planck - which now points to planck2.cfg to modify the key layout ##

teensy = False
hw_boot_key = False

display_height = int(4*4)
display_width = int(12*5) ##Changed from 12*4 to 12*5##

num_rows = 5  ##Changed from 4 ##
num_cols = 12

although i'm not sure if i need to alter the
'Matrix_hardware'
'Matrix_strobe' and
'Matrix_sense'
lines to accommodate the new row or does that just work its own magic now?
« Last Edit: Sun, 16 October 2016, 13:24:16 by mark.wood_uk »

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1988 on: Sun, 16 October 2016, 14:15:31 »
You need a (4, none, '0') instead of the extra Z to make a space behind the tall key.
display_width should stay 12*4 - this means 12 switches at 4 quarter widths wide.  You have added a row so display_height is the one to change.

You will need to add an extra pin for the extra row but if you can work that out you're doing well - there's a friendlier way of doing it in newer files such as the GH60 which you can swap in.
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline bpiphany

  • Posts: 1033
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1989 on: Sun, 16 October 2016, 17:18:12 »
This
That's normal. Just pick No. The efuse does not use all the bits and avrdude gets confused when reading it back.

But not this
Boards running the Atmel DFU bootloader have HWB pulled high.
At least not on any of my controllers. HWB pulled low says jump to bootloader on reset.

Do you still have a bootloader programmed onto the controller? Do you have a hex file for some DFU bootloader (or other)?

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1990 on: Sun, 16 October 2016, 17:38:40 »
This
That's normal. Just pick No. The efuse does not use all the bits and avrdude gets confused when reading it back.

But not this
Boards running the Atmel DFU bootloader have HWB pulled high.
At least not on any of my controllers. HWB pulled low says jump to bootloader on reset.

Do you still have a bootloader programmed onto the controller? Do you have a hex file for some DFU bootloader (or other)?

Oops, missed this earlier!  Strange how it can read one board correctly but not the other but if you both say so I'll believe it.

Just plugged the 'Arduino' in and it showed up as an Arduino, it's been flashed to the dodgy Teensy replacement, the Atmel one and back to Arduino several times so I had no idea where I'd left it :))

Flashing to DFU as I type...

Edit: Flashed GH60 hex and it works!  Now to try Nerd

Edit 2:  Flashed Nerd firmware and it outputs keys when poked with a diode - now wondering why I didn't test it before?   Thanks bpiphany, I  will PM tedk and see if he's able to test it.  Even the reset button works.  Well, it would if it wasn't covered in superglue!
« Last Edit: Sun, 16 October 2016, 18:09:26 by suicidal_orange »
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline bpiphany

  • Posts: 1033
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1991 on: Sun, 16 October 2016, 18:12:09 »
You're welcome! Wasn't much work on my part =D

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1992 on: Sun, 16 October 2016, 18:20:04 »
You're welcome! Wasn't much work on my part =D

You made me look at it, I'd not have made any progress otherwise!
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline mark.wood_uk

  • Posts: 34
  • Location: Aberdeenshire, UK
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1993 on: Mon, 17 October 2016, 14:51:51 »
You need a (4, none, '0') instead of the extra Z to make a space behind the tall key.
display_width should stay 12*4 - this means 12 switches at 4 quarter widths wide.  You have added a row so display_height is the one to change.

I Put the (4, None, '0') in place of that extra line, but it still displays a 'blank' patch over the lower half of the double height key, but i think that it's only affecting the visual layout now?
I just returned the tab to a 1x1 in the .py (i know how its meant to be! getting the keyboard to work right is the important bit)

I did cotton onto the display_height/display_width after a little while and had already fixed that bit by the time i read the post (thanks for clarifying that i was right though  :D)

I think i need to change: 'teensey = false' to 'teensy = true'  :-\
But not sure as it lists 'ATmega32U4_16MHz_SIXTY as firmware' already at the top! (thats a little confusing )

You will need to add an extra pin for the extra row but if you can work that out you're doing well - there's a friendlier way of doing it in newer files such as the GH60 which you can swap in.

Err, yea lol!
Cant make heads or tails of the hex part, ive ran it through a hex converter to see if i could figure it out that way but still looks like random numbers to me, can't see a pattern! (well not one i could guestimate at any rate)
As far as i can figure it looks to strobe on 5 rows and sense on 12 columns (which seems right without modifying aqnything, although i thought it should strobe on the columns and sense on the rows, but that could just be because diodes are the opposite way round on a real planck?)

When you say i can just swap in from the 'GH60.py (Supports backlight)' is that everything from Line 19-75 then edit line 42/43 to my proposed pins? (as well as the lines i have already changed in this copied .py)
rows=[C7, C6, D3, D2, D1],
cols=[F0, F1, F4, F5, F6, F7, B6, B5, B4, D7, D4, D5]

I believe those pins are all good to use and leaves me 6 usable pins (D0, B7, B3, B2, B1, B0) possibly allowing me to add RGB back lighting in the future since there looks to be backlighting support with that section of the gh60? (was thinking x4 or x6 WS2812B addressable LEDs, nothing fancy just on/off and manual colour change)

And I would also like to say thank you SO much for your help so far, it is greatly appreciated  :thumb:  :thumb:
I have got further in the last couple of days with this and your advice than i have in the last few weeks with the 3.2!

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1994 on: Mon, 17 October 2016, 17:35:21 »
I think i need to change: 'teensy = false' to 'teensy = true'  :-\

Well, are you using a Teensy? :))

I Put the (4, None, '0') in place of that extra line, but it still displays a 'blank' patch over the lower half of the double height key, but i think that it's only affecting the visual layout now?
Yes, purely visual.  If you look in the top right of the keymapper gui it has sections for layout row/column as well as matrix row/colum - on a Plank they are the same but take a look at the Kitten Paw...

But not sure as it lists 'ATmega32U4_16MHz_SIXTY as firmware' already at the top! (thats a little confusing )
These are binary firmware blobs the gui builds against which define the maximum number of rows and columns - SIXTY is good for your build as you want pins left for LEDs, but if you wanted to build a bigger board you'd need to change it. 

To switch to the new config add this on line 21 then replace lines 39-70 with 39-45 and change you pins, the rest hasn't changed.
Code: [Select]
from easykeymap.helper import make_matrix_config

MOZ is supposedly working on adding WS2812B support but haven't heard anything about it lately, so you're stuck with standard LEDs for now - you can do RGB using one pin per colour if you don't use too many (LED circuits are not my speciality)


And I would also like to say thank you SO much for your help so far, it is greatly appreciated  :thumb:  :thumb:
I have got further in the last couple of days with this and your advice than i have in the last few weeks with the 3.2!

No problem, sometimes the old faithful is better than the shiny new model :thumb:
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline mark.wood_uk

  • Posts: 34
  • Location: Aberdeenshire, UK
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1995 on: Tue, 18 October 2016, 05:34:23 »
I think i need to change: 'teensy = false' to 'teensy = true'  :-\

Well, are you using a Teensy? :))

I knew I'd have to ask 1 stupid question, it's obligatory Lmao

I wasn't planning on getting fancy with the LEDs anyway, but thats a much simpler solution, standard rgb LEDs connected in parallel and use a pin per colour!

Thanks again dude!
Now just waiting on the post for the Teensy to arrive!

Offline tedk

  • Posts: 49
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1996 on: Mon, 24 October 2016, 13:50:09 »
This
That's normal. Just pick No. The efuse does not use all the bits and avrdude gets confused when reading it back.

But not this
Boards running the Atmel DFU bootloader have HWB pulled high.
At least not on any of my controllers. HWB pulled low says jump to bootloader on reset.

Do you still have a bootloader programmed onto the controller? Do you have a hex file for some DFU bootloader (or other)?

Oops, missed this earlier!  Strange how it can read one board correctly but not the other but if you both say so I'll believe it.

Just plugged the 'Arduino' in and it showed up as an Arduino, it's been flashed to the dodgy Teensy replacement, the Atmel one and back to Arduino several times so I had no idea where I'd left it :))

Flashing to DFU as I type...

Edit: Flashed GH60 hex and it works!  Now to try Nerd

Edit 2:  Flashed Nerd firmware and it outputs keys when poked with a diode - now wondering why I didn't test it before?   Thanks bpiphany, I  will PM tedk and see if he's able to test it.  Even the reset button works.  Well, it would if it wasn't covered in superglue!

heyhey, bad news :(  i flashed it on the nerd60 and it's still the same usb error. im going to check the fuses tomorrow after work. what are your fuses settings?

btw: portugal was a dream :D

Offline tedk

  • Posts: 49
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1997 on: Thu, 27 October 2016, 15:52:06 »
ok, i played with the fuses and still no progress :(

http://www.engbedded.com/fusecalc

2k Bootloader address is necessary for the atmel bootloader to work.

settings that work with the tmk firmware:
avrdude -c usbasp -p m32u4 -U lfuse:w:0xdf:m -U hfuse:w:0xd8:m -U efuse:w:0xc3:m -P /dev/USBasp
avrdude -c usbasp -p m32u4 -U lfuse:w:0xdf:m -U hfuse:w:0xd9:m -U efuse:w:0xc3:m -P /dev/USBasp


Settings i tried, but no success:
avrdude -c usbasp -p m32u4 -P /dev/USBasp -U lfuse:w:0x5e:m -U hfuse:w:0x98:m -U efuse:w:0xf3:m (from your gh60 readings)


Both are the same, except that the first one enters DFU mode at boot.
FYI: It seems i cant read the settings from my gh60,  USBASP runs in a timeout ALL the time. maybe a crack in my GH60 PCB? :/

« Last Edit: Thu, 27 October 2016, 15:56:54 by tedk »

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1998 on: Thu, 27 October 2016, 16:19:25 »
Well I don't know what to say - everything says it should work!  Your USBASP must work if it can flash fuses and bootloaders, your Nerd must work as it's fine with TMK and your GH60 can't be too damaged, assuming it works.  Yet you have two problems :confused:

I'd quite like to get my hands on a Nerd just to test but no way am I playing the gon lottery!
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline tedk

  • Posts: 49
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1999 on: Fri, 28 October 2016, 11:10:01 »
Well I don't know what to say - everything says it should work!  Your USBASP must work if it can flash fuses and bootloaders, your Nerd must work as it's fine with TMK and your GH60 can't be too damaged, assuming it works.  Yet you have two problems :confused:

I'd quite like to get my hands on a Nerd just to test but no way am I playing the gon lottery!

wanna test my board? ;) we can split the shippingcosts.