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

0 Members and 5 Guests are viewing this topic.

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1400 on: Wed, 03 February 2016, 17:59:15 »
Handwired teensy 2.0

What did your config look like for the new version?  Don't forget the [ code] tags :)

you mean the pinouts?

That's the old version, the new one's only been around a week or so :)


Metalliqaz - is the plan for a "handwire" with a simple options file like last time or will all custom layouts need the sense/scan binary stuff done like the pre-made ones?  My coding skills aren't up to helping improve the backend, but I could do some serious spreadsheet abuse to generate config files based on a choice of controller (for available pins), a "which pins used where" list, and diode orientation.  No point if you're planning something easier though...
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1401 on: Wed, 03 February 2016, 18:31:54 »
Handwired teensy 2.0

What did your config look like for the new version?  Don't forget the [ code] tags :)

you mean the pinouts?

That's the old version, the new one's only been around a week or so :)


Metalliqaz - is the plan for a "handwire" with a simple options file like last time or will all custom layouts need the sense/scan binary stuff done like the pre-made ones?  My coding skills aren't up to helping improve the backend, but I could do some serious spreadsheet abuse to generate config files based on a choice of controller (for available pins), a "which pins used where" list, and diode orientation.  No point if you're planning something easier though...

The Handwire plan was ****.  I tossed it.  The new method will be to make a new python config just like all the others.

I will make an example, as well as some helper functions that should make it very easy to set up with essentially the same information from the old .ini file.

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1402 on: Wed, 03 February 2016, 18:35:53 »
Looking good!  Strangely though caps lock didn't, but remaping it to ctrl the key did - is there any chance you broke the scancode? :confused:

hmmm, sounds like the matrix location of that key is programmed wrong.  Right now I've got it as (2,0) and that seems to match up with TMK.  If you can map caps to a different key then the scancode is fine.  Could this possibly be a Rev.C change?  I assume this is the only key on the board that doesn't work.

I can try and look more tonight.  It's so great that the GH60 is finally getting some testing!

Further testing completed - not sure what I was doing wrong but clearly something, as caps lock now works perfectly on a layer and the key works just fine as ctrl on the default layer.

The "All keys" layout is confirmed as all working, the only strangeness is that if you use a 1u-1.75u right shift split the keys are swapped compared to their matrix positions, so by default FN is inside shift.  It's a hardware issue but worth noting if anyone queries it.

Thanks for your help and sorry for the false alarm, I will resume attempting to add some LEDs.


Edit: Caps lock LED works - EasyAVR is now more functional than TMK on the GH60 :thumb:

Not a hardware issue, gotta be a problem with the layout.  Sounds like the (3,12) and (3,13) need to be flipped.

So what are the LEDs in the rev c?  it has more than 1 now?

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1403 on: Wed, 03 February 2016, 19:53:06 »
Alright it's done.  This is a helluva lot easier way to configure the GH60, no?

Code: [Select]
num_rows = 5
num_cols = 14

strobe_cols = False
strobe_low = True

matrix_hardware, matrix_strobe, matrix_sense = make_config(
    strobe_cols=strobe_cols,
    strobe_low=strobe_low,
    rows=[D0, D1, D2, D3, D5],
    cols=[F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3],
    device=firmware.device
)

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1404 on: Wed, 03 February 2016, 21:03:05 »

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1405 on: Wed, 03 February 2016, 21:36:51 »
Its a v2.

Found a bug, committed a fix.  Hopefully that works.

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1406 on: Thu, 04 February 2016, 02:27:30 »

The "All keys" layout is confirmed as all working, the only strangeness is that if you use a 1u-1.75u right shift split the keys are swapped compared to their matrix positions, so by default FN is inside shift.  It's a hardware issue but worth noting if anyone queries it.

Not a hardware issue, gotta be a problem with the layout.  Sounds like the (3,12) and (3,13) need to be flipped.

So what are the LEDs in the rev c?  it has more than 1 now?

No it's definitely hardware, there are multiple positions for the switches - you can have a big shift, 1.75-1 as in HHKB or 1-1.75 as I've done, the last option reverses them (looking at the pads I can see why they did it - way easier!)  I guess you'd need a new version of each layout for this option, including "all keys" - hardly seems worth it.

poker arrows LEDs are routed to PF4; WASD to PF7; Caps to PB2; Esc to PF6. All of them are active LOW.


Will have a look at the handwire stuff tonight - looks way easier! :)
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline fknraiden

  • Posts: 496
  • Location: Portland, OR
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1407 on: Thu, 04 February 2016, 03:30:51 »
Alright it's done.  This is a helluva lot easier way to configure the GH60, no?

Code: [Select]
num_rows = 5
num_cols = 14

strobe_cols = False
strobe_low = True

matrix_hardware, matrix_strobe, matrix_sense = make_config(
    strobe_cols=strobe_cols,
    strobe_low=strobe_low,
    rows=[D0, D1, D2, D3, D5],
    cols=[F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3],
    device=firmware.device
)

Can't really see on my phone, is this an updated version? I
Annotated example of a handwired board: https://github.com/dhowland/EasyAVR/blob/master/keymapper/easykeymap/boards/handwire.py

I feel bad, but how do I implement this to help my situation. Thanks again.

IBM SSK 87'     ReAlForce 55g Silent 10AE

Offline TheGlow

  • Posts: 48
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1408 on: Thu, 04 February 2016, 08:22:37 »
Its a v2.

Found a bug, committed a fix.  Hopefully that works.
So far so good. All keys and bindings appear ok.
I'll run it a bit and see if I encounter the multi hits.
Is there any documentation for more depth regarding macro programming? I see I can just type in characters for straight text entry, but how can I do items like sending tabs, alt-tabs, etc?  We have a "new" ticketing system thats browser based and doesn't allow any templates so I spend more time filling in fields than actual work.

Edit: So far from mild use like a few brief entries in a form, spreadsheet, is fine.
Once I go to type up an email or something more in depth I've seen a few. It looks like H has done it twice, "don’t know whaht" and "its thhe weather"
I had one case of a spacebar delay so far, "you l ose"
I will keep you posted. It definitely feels a lot better than I remember.
« Last Edit: Thu, 04 February 2016, 08:51:42 by TheGlow »

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1409 on: Thu, 04 February 2016, 09:14:45 »
Its a v2.

Found a bug, committed a fix.  Hopefully that works.
So far so good. All keys and bindings appear ok.
I'll run it a bit and see if I encounter the multi hits.
Is there any documentation for more depth regarding macro programming? I see I can just type in characters for straight text entry, but how can I do items like sending tabs, alt-tabs, etc?  We have a "new" ticketing system thats browser based and doesn't allow any templates so I spend more time filling in fields than actual work.

The help menu is your friend.

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1410 on: Thu, 04 February 2016, 09:49:52 »
Edit: So far from mild use like a few brief entries in a form, spreadsheet, is fine.
Once I go to type up an email or something more in depth I've seen a few. It looks like H has done it twice, "don’t know whaht" and "its thhe weather"
I had one case of a spacebar delay so far, "you l ose"
I will keep you posted. It definitely feels a lot better than I remember.

Okay this is interesting.  I will get out my Black Petal tonight and try it out to see if I have the same problem.  I'm not sure what makes these boards so susceptible to this issue, but I've heard reports like this before so I want to get a handle on it.

It seems like a chatter issue, but if the debounce can't fix it then it must be something else.  If I find that H and space are on the same column, then that will be a clue.

Offline TheGlow

  • Posts: 48
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1411 on: Thu, 04 February 2016, 10:13:00 »
Edit: So far from mild use like a few brief entries in a form, spreadsheet, is fine.
Once I go to type up an email or something more in depth I've seen a few. It looks like H has done it twice, "don’t know whaht" and "its thhe weather"
I had one case of a spacebar delay so far, "you l ose"
I will keep you posted. It definitely feels a lot better than I remember.

Okay this is interesting.  I will get out my Black Petal tonight and try it out to see if I have the same problem.  I'm not sure what makes these boards so susceptible to this issue, but I've heard reports like this before so I want to get a handle on it.

It seems like a chatter issue, but if the debounce can't fix it then it must be something else.  If I find that H and space are on the same column, then that will be a clue.
Its definitely odd as bpiphany's default firmware and the onnes I built with TMK were fine.
Ahh see, double n on the previous sentence. It definitely seems more common when i am doing much more typing.
I had another I think with I,  "I idon't".  Again I'll try and keep an eye when it happens. Some of them I fix by reflex and forget I need to document more info on.
Debounce is still on 6 default. Do you want me to try adjusting it a bit?

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1412 on: Thu, 04 February 2016, 11:10:28 »
I would try 16. Shouldn't be necessary to go higher than that.   If it still happens then that should eliminate chatter as thr culprit

Offline TheGlow

  • Posts: 48
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1413 on: Thu, 04 February 2016, 12:03:12 »
I would try 16. Shouldn't be necessary to go higher than that.   If it still happens then that should eliminate chatter as thr culprit
I noticed 2 more cases with H's and 1 with o. more = moroe. I just set the debounce now so I'll keep an eye out. Thank y ou sir. < delayed space after y. I don't think that was me on purpose. 

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1414 on: Thu, 04 February 2016, 17:06:52 »
I would try 16. Shouldn't be necessary to go higher than that.   If it still happens then that should eliminate chatter as thr culprit
I noticed 2 more cases with H's and 1 with o. more = moroe. I just set the debounce now so I'll keep an eye out. Thank y ou sir. < delayed space after y. I don't think that was me on purpose.

Okay so we've ruled out simple chatter.  Next I'd like to try settle delay.  This is the time we wait for the matrix hardware to settle into high/low configuration after selecting a column, before attempting to read the row.  I have a new build for you.  Can you unzip this into your "builds" directory, overwriting the old .hex file, then try building and reprogramming?


Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1415 on: Thu, 04 February 2016, 19:07:59 »
poker arrows LEDs are routed to PF4; WASD to PF7; Caps to PB2; Esc to PF6. All of them are active LOW.

The above is correct - not really sure what defines an indicator so went with all of them (why not light up WASD as a huge warning when Caps Lock is on??) and wasn't sure how to set LEDs default to nothing, so set them to things.  This works in the version downloaded a couple of hours ago with the easy rows/columns stuff - very easy to add :)

Is the "Alt layouts" section at the bottom functional?  I checked several boards for an example but found none...

Code: [Select]
num_leds = 4
num_ind = 4
num_bl_enab = 2

led_definition = [
    ('Caps Key', 'Caps Lock'),
    ('Esc Key', 'Num Lock'),
    ('WASD', 'Fn2 Active'),
    ('Poker Arrows', 'Fn Active')
]

led_hardware = [
#       Port    Pin    Direction
    ( REF_PORTB, 2, LED_DRIVER_PULLDOWN ),
    ( REF_PORTF, 4, LED_DRIVER_PULLDOWN ),
    ( REF_PORTF, 6, LED_DRIVER_PULLDOWN ),
    ( REF_PORTF, 7, LED_DRIVER_PULLDOWN )
]

backlighting = False

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



@fknraiden - please find attached a .hex which is configured as below (based on the rows/cols you posted above) 
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 a hand-wired keyboard"""

# The first decision you have to make is to choose a hardware
# layout.  Assuming you are using a Teensy2.0, this is probably
# the best hardware layout for you.  ATmega32U4_16MHz_SIXTY might
# also work for you, though.  Leave the rest of the imports like
# they are here.
import easykeymap.templates.ATmega32U4_16MHz_TKL as firmware
from easykeymap.ioports import *
from easykeymap.helper import make_matrix_config

# The name of the board in the "New" dialog
description = "Hand-wire"
# Unique string to identify THIS exact hardware layout
unique_id = "HANDWIRE_001"
# The name of the .cfg file the system will try to find for altered
# layout options
cfg_name = "handwire"

# Hand-wired boards usually use Teensy controllers.  Set this to
# True to make sure that the bootloader works.
teensy = True
# If your board has an exposed switch for going into boot mode, you
# can set this to True and the system won't prompt you to add a BOOT
# key to your layout.
hw_boot_key = False

# These two parameters define the size of the keyboard in the display.
# Must be whole numbers in units of quarter key lengths.  A TKL
# usually is 6 rows high with a 1/2 key length gutter under the Fn row.
# Therefore int(6.5*4).  Apply the same logic the width.  Remember
# we are talking visual width, not number of columns.
display_height = int(6.5*4)
display_width = int(18.25*4)

# The number of rows and columns in the matrix.  In a hand-wired board
# each of these will correspond to a single pin.
num_rows = 6
num_cols = 17

# Keyboards work by scanning a matrix to check each key.  The scan
# works by setting an active row/column (strobing) and then reading
# the status of every switch that crosses it (sensing).
# strobe_cols tells the firmware which direction you have your diodes
# installed.  If diodes go from column to row, then strobe_cols must
# be True.  If diodes go from row to column, then strobe_cols must be
# False.
strobe_cols = True
# strobe_low tells the firmware if a row/column should be activated
# by pulling the pin high or low.  Hand-wired boards will almost always
# use strobe_low = True
strobe_low = True

# The matrix_hardware, matrix_strobe, matrix_sense parameters tell
# the firmware how to initialize the ports, what pins must be set
# for each row/column, and what order to strobe/sense.  These are
# complicated and are explained fully elsewhere.  It is easiest to
# configure the matrix by using the make_matrix_config function as
# shown below.  Just customize 'rows' and 'cols' for your project.
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=[B1, B2, B3, B7, D0, D1, D2, D3, C6, C7, D5, D6, D7, B4, B5, B6],
    device=firmware.device
)

# The total number of LED outputs (indicators + backlights)
num_leds = 1
# The number of LED indicators (for example, caps lock)
num_ind = 1
# The number of backlight enable modes.  This counts the number of
# options available for the BL_ENABLE key
num_bl_enab = 2

# Define the default assignments of the indicator LEDs.  The length
# of this list must equal num_ind.  For each LED, the first string
# is the description of the key shown in the GUI.  The second string
# is the default function.  For valid function options, see
# led_assignments in gui.py
led_definition = [
    ('Caps Key', 'Caps Lock')
]

# Definition of LED pins.  (indicators and backlights)  Indicators
# must come first.  LED_DRIVER_PULLUP is used when the pin is connected
# to the anode and the cathode is connected to ground.
# LED_DRIVER_PULLDOWN is used when the pin is connected to the cathode
# and the anode is connected to the power supply.
led_hardware = [
#       Port    Pin    Direction
    ( REF_PORTB, 6, LED_DRIVER_PULLUP )
]

# True if the board supports backlight, otherwise False
backlighting = False

# This can be used to configure different backlighting zones.  Explained
# in more detail elsewhere.  Length of list must equal num_bl_enab.
# Length of each tuple must equal num_leds.  Uses the same ordering
# as led_hardware
bl_modes = [
    ( 0, ),
    ( 1, )
]

# Just leave this here as-is.
KMAC_key = None

# Define your layout.  This is a list of rows.  Each row is a list
# of keys.  Each key is a tuple of three items.  First item is a tuple
# defining the width,height of the key.  If it is just a number, it
# will be a space instead of a key.  All units are in quarter key lengths,
# so a standard key would be (4,4).  Second item is a tuple defining the
# row,column in the matrix for that key.  Third item is the default scancode
# for that key, from scancodes.py.  If a row is a number instead of a list,
# it will just make a vertical spacer.
keyboard_definition = [
    [((4, 4), (0, 0), 'HID_KEYBOARD_SC_ESCAPE'),
     (4, None, '0'),
     ((4, 4), (0, 2), 'HID_KEYBOARD_SC_F1'),
     ((4, 4), (0, 3), 'HID_KEYBOARD_SC_F2'),
     ((4, 4), (0, 4), 'HID_KEYBOARD_SC_F3'),
     ((4, 4), (0, 5), 'HID_KEYBOARD_SC_F4'),
     (2, None, '0'),
     ((4, 4), (0, 6), 'HID_KEYBOARD_SC_F5'),
     ((4, 4), (0, 7), 'HID_KEYBOARD_SC_F6'),
     ((4, 4), (0, 8), 'HID_KEYBOARD_SC_F7'),
     ((4, 4), (0, 9), 'HID_KEYBOARD_SC_F8'),
     (2, None, '0'),
     ((4, 4), (0, 10), 'HID_KEYBOARD_SC_F9'),
     ((4, 4), (0, 11), 'HID_KEYBOARD_SC_F10'),
     ((4, 4), (0, 12), 'HID_KEYBOARD_SC_F11'),
     ((4, 4), (0, 13), 'HID_KEYBOARD_SC_F12'),
     (1, None, '0'),
     ((4, 4), (0, 14), 'HID_KEYBOARD_SC_PRINT_SCREEN'),
     ((4, 4), (0, 15), 'HID_KEYBOARD_SC_SCROLL_LOCK'),
     ((4, 4), (0, 16), 'HID_KEYBOARD_SC_PAUSE')],

    2,

    [((4, 4), (1, 1), 'HID_KEYBOARD_SC_GRAVE_ACCENT_AND_TILDE'),
     ((4, 4), (1, 1), 'HID_KEYBOARD_SC_1_AND_EXCLAMATION'),
     ((4, 4), (1, 2), 'HID_KEYBOARD_SC_2_AND_AT'),
     ((4, 4), (1, 3), 'HID_KEYBOARD_SC_3_AND_HASHMARK'),
     ((4, 4), (1, 4), 'HID_KEYBOARD_SC_4_AND_DOLLAR'),
     ((4, 4), (1, 5), 'HID_KEYBOARD_SC_5_AND_PERCENTAGE'),
     ((4, 4), (1, 6), 'HID_KEYBOARD_SC_6_AND_CARET'),
     ((4, 4), (1, 7), 'HID_KEYBOARD_SC_7_AND_AND_AMPERSAND'),
     ((4, 4), (1, 8), 'HID_KEYBOARD_SC_8_AND_ASTERISK'),
     ((4, 4), (1, 9), 'HID_KEYBOARD_SC_9_AND_OPENING_PARENTHESIS'),
     ((4, 4), (1, 10), 'HID_KEYBOARD_SC_0_AND_CLOSING_PARENTHESIS'),
     ((4, 4), (1, 11), 'HID_KEYBOARD_SC_MINUS_AND_UNDERSCORE'),
     ((4, 4), (1, 12), 'HID_KEYBOARD_SC_EQUAL_AND_PLUS'),
     ((8, 4), (1, 13), 'HID_KEYBOARD_SC_BACKSPACE'),
     (1, None, '0'),
     ((4, 4), (1, 14), 'HID_KEYBOARD_SC_INSERT'),
     ((4, 4), (1, 15), 'HID_KEYBOARD_SC_HOME'),
     ((4, 4), (1, 16), 'HID_KEYBOARD_SC_PAGE_UP')],

    [((6, 4), (2, 0), 'HID_KEYBOARD_SC_TAB'),
     ((4, 4), (2, 1), 'HID_KEYBOARD_SC_Q'),
     ((4, 4), (2, 2), 'HID_KEYBOARD_SC_W'),
     ((4, 4), (2, 3), 'HID_KEYBOARD_SC_E'),
     ((4, 4), (2, 4), 'HID_KEYBOARD_SC_R'),
     ((4, 4), (2, 5), 'HID_KEYBOARD_SC_T'),
     ((4, 4), (2, 6), 'HID_KEYBOARD_SC_Y'),
     ((4, 4), (2, 7), 'HID_KEYBOARD_SC_U'),
     ((4, 4), (2, 8), 'HID_KEYBOARD_SC_I'),
     ((4, 4), (2, 9), 'HID_KEYBOARD_SC_O'),
     ((4, 4), (2, 10), 'HID_KEYBOARD_SC_P'),
     ((4, 4), (2, 11), 'HID_KEYBOARD_SC_OPENING_BRACKET_AND_OPENING_BRACE'),
     ((4, 4), (2, 12), 'HID_KEYBOARD_SC_CLOSING_BRACKET_AND_CLOSING_BRACE'),
     ((6, 4), (2, 13), 'HID_KEYBOARD_SC_BACKSLASH_AND_PIPE'),
     (1, None, '0'),
     ((4, 4), (2, 14), 'HID_KEYBOARD_SC_DELETE'),
     ((4, 4), (2, 15), 'HID_KEYBOARD_SC_END'),
     ((4, 4), (2, 16), 'HID_KEYBOARD_SC_PAGE_DOWN')],

    [((7, 4), (3, 0), 'HID_KEYBOARD_SC_CAPS_LOCK'),
     ((4, 4), (3, 1), 'HID_KEYBOARD_SC_A'),
     ((4, 4), (3, 2), 'HID_KEYBOARD_SC_S'),
     ((4, 4), (3, 3), 'HID_KEYBOARD_SC_D'),
     ((4, 4), (3, 4), 'HID_KEYBOARD_SC_F'),
     ((4, 4), (3, 5), 'HID_KEYBOARD_SC_G'),
     ((4, 4), (3, 6), 'HID_KEYBOARD_SC_H'),
     ((4, 4), (3, 7), 'HID_KEYBOARD_SC_J'),
     ((4, 4), (3, 8), 'HID_KEYBOARD_SC_K'),
     ((4, 4), (3, 9), 'HID_KEYBOARD_SC_L'),
     ((4, 4), (3, 10), 'HID_KEYBOARD_SC_SEMICOLON_AND_COLON'),
     ((4, 4), (3, 11), 'HID_KEYBOARD_SC_APOSTROPHE_AND_QUOTE'),
     ((9, 4), (3, 13), 'HID_KEYBOARD_SC_ENTER'),
     (13, None, '0')],

    [((9, 4), (4, 0), 'HID_KEYBOARD_SC_LEFT_SHIFT'),
     ((4, 4), (4, 2), 'HID_KEYBOARD_SC_Z'),
     ((4, 4), (4, 3), 'HID_KEYBOARD_SC_X'),
     ((4, 4), (4, 4), 'HID_KEYBOARD_SC_C'),
     ((4, 4), (4, 5), 'HID_KEYBOARD_SC_V'),
     ((4, 4), (4, 6), 'HID_KEYBOARD_SC_B'),
     ((4, 4), (4, 7), 'HID_KEYBOARD_SC_N'),
     ((4, 4), (4, 8), 'HID_KEYBOARD_SC_M'),
     ((4, 4), (4, 9), 'HID_KEYBOARD_SC_COMMA_AND_LESS_THAN_SIGN'),
     ((4, 4), (4, 10), 'HID_KEYBOARD_SC_DOT_AND_GREATER_THAN_SIGN'),
     ((4, 4), (4, 11), 'HID_KEYBOARD_SC_SLASH_AND_QUESTION_MARK'),
     ((11, 4), (4, 13), 'HID_KEYBOARD_SC_RIGHT_SHIFT'),
     (5, None, '0'),
     ((4, 4), (4, 15), 'HID_KEYBOARD_SC_UP_ARROW'),
     (4, None, '0')],

    [((5, 4), (5, 0), 'HID_KEYBOARD_SC_LEFT_CONTROL'),
     ((5, 4), (5, 1), 'HID_KEYBOARD_SC_LEFT_GUI'),
     ((5, 4), (5, 2), 'HID_KEYBOARD_SC_LEFT_ALT'),
     ((25, 4), (5, 6), 'HID_KEYBOARD_SC_SPACE'),
     ((5, 4), (5, 10), 'HID_KEYBOARD_SC_RIGHT_ALT'),
     ((5, 4), (5, 11), 'HID_KEYBOARD_SC_RIGHT_GUI'),
     ((5, 4), (5, 12), 'HID_KEYBOARD_SC_APPLICATION'),
     ((5, 4), (5, 13), 'HID_KEYBOARD_SC_RIGHT_CONTROL'),
     (1, None, '0'),
     ((4, 4), (5, 14), 'HID_KEYBOARD_SC_LEFT_ARROW'),
     ((4, 4), (5, 15), 'HID_KEYBOARD_SC_DOWN_ARROW'),
     ((4, 4), (5, 16), 'HID_KEYBOARD_SC_RIGHT_ARROW')]
]

# Just leave this here as-is.
alt_layouts = {}

It may output something, it may not - if you could post a pic of your matrix it should be an easy tweak to make it work if it doesn't...
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1416 on: Thu, 04 February 2016, 21:43:52 »
indicators are every LED that isn't a backlight.  Things you can assign capslock, numlock, or fn_active to.

Offline TheGlow

  • Posts: 48
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1417 on: Fri, 05 February 2016, 23:05:47 »
I would try 16. Shouldn't be necessary to go higher than that.   If it still happens then that should eliminate chatter as thr culprit
I noticed 2 more cases with H's and 1 with o. more = moroe. I just set the debounce now so I'll keep an eye out. Thank y ou sir. < delayed space after y. I don't think that was me on purpose.

Okay so we've ruled out simple chatter.  Next I'd like to try settle delay.  This is the time we wait for the matrix hardware to settle into high/low configuration after selecting a column, before attempting to read the row.  I have a new build for you.  Can you unzip this into your "builds" directory, overwriting the old .hex file, then try building and reprogramming?
Thanks, I'll report back on Monday as I leave that keyboard at work and I was out sick today.

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1418 on: Tue, 09 February 2016, 19:50:52 »
Just pushed an update to the repository.  It should now be safe to run as a package.  also, I added the ability to have user-specific board configurations.  If you want to add a handwire board, you just copy the handwire.py file and put it in ~/.EasyAVR/boards (created automatically by running the tool), then customize it to your heart's content.  Then, when the tool is upgraded to the latest version, your own config will still be there.

Offline TheGlow

  • Posts: 48
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1419 on: Thu, 11 February 2016, 07:57:40 »
Okay so we've ruled out simple chatter.  Next I'd like to try settle delay.  This is the time we wait for the matrix hardware to settle into high/low configuration after selecting a column, before attempting to read the row.  I have a new build for you.  Can you unzip this into your "builds" directory, overwriting the old .hex file, then try building and reprogramming?
Sorry for the delay. I was out sick so didn't get a chance to try until yesterday. I have had a few but it seems much less. I think maybe 3-4 yesterday. I had 1 so far this morning. I'll keep an eye out for more. I also had the bounce back to 6 so if I see more I will raise up to 16 again and see if any improvement.

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1420 on: Thu, 11 February 2016, 11:35:07 »
If it has made a noticable difference, then it seems likely that settle time is the culprit.  I will probably make settle time configurable through the console like debounce time.  I will also double check to ensure the I/O pins are being configured correctly for pull-up and whatnot.

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1421 on: Thu, 11 February 2016, 19:08:33 »
Alright "matrix setup wait" is now a configurable setting.  Original builds had it locked at 2.  Your test build had it locked at 10.  It now defaults to 5 on 16MHz boards and can be increased to 255.  To achieve equivalence with TMK, you should probably try a setting of 20 or so.  Hopefully that solves the problem.  Not sure why these costar boards are so slow, but at least it's easy to modify now.

Offline TheGlow

  • Posts: 48
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1422 on: Fri, 12 February 2016, 11:41:18 »
Alright "matrix setup wait" is now a configurable setting.  Original builds had it locked at 2.  Your test build had it locked at 10.  It now defaults to 5 on 16MHz boards and can be increased to 255.  To achieve equivalence with TMK, you should probably try a setting of 20 or so.  Hopefully that solves the problem.  Not sure why these costar boards are so slow, but at least it's easy to modify now.
I keep forgetting to pay attention in which combinations trigger but H seems to be common and space bars.
But yes, it does feel much better and they appear less often.
Ill try the new build and work my way up. So TMK has it at 20? Ill fiddle around with 15 to 20 and then see how it is.

Offline TheGlow

  • Posts: 48
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1423 on: Tue, 16 February 2016, 10:16:29 »
I tried matrix wait on 15 and still had some h's and i's duplicating.
I raised it to 20 and shortly after still had some h's and space bars going. Edit: and some i's again.
« Last Edit: Tue, 16 February 2016, 10:22:46 by TheGlow »

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1424 on: Tue, 16 February 2016, 11:47:23 »
ugh, wtf??

Okay, the fact that the keys work at all is enough to prove that the matrix is lined up correctly.  We've tried extending the debounce time, we've tried extending the setup time.  The only thing left is to ensure that other parts of the matrix are not interfering.  Are there other keys that have to be pressed to make your H or I glitch?


Offline TheGlow

  • Posts: 48
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1425 on: Tue, 16 February 2016, 14:48:24 »
ugh, wtf??

Okay, the fact that the keys work at all is enough to prove that the matrix is lined up correctly.  We've tried extending the debounce time, we've tried extending the setup time.  The only thing left is to ensure that other parts of the matrix are not interfering.  Are there other keys that have to be pressed to make your H or I glitch?
I've tried documenting them better, and have had 2 a's and a k repeat on me. there were 2 others but I cant recall as I corrected it while going.
So in about 5 hours I've had maybe 5 instances?
Should I try bringing it up more? the last 2 i copied some of it, came = camea.
NewYork is = NewYork iks
I would think maybe repeat delay but I cant see how I would still hold k after a space and an I.
If pushing I can type about 95 (it just did it, 995) wpm. but when these are occurring Im probably only cruising around 50-70


Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1426 on: Tue, 16 February 2016, 16:05:22 »
I'm going to try something new tonight.

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1427 on: Wed, 17 February 2016, 00:06:05 »
Okay so I reconfigured the frosty flake v2 file.  Just to make sure, I used bpiphany's exact layout from his latest code.  These costar boards are so scrambled, if I need to debug I'll use his arrangement.

Make sure you have the latest keymapper code.  Run it at least once.  Put the attached file in your C:\Users\<username>\.EasyAVR\boards .  Make a new config using the "Frosty Flake v2 TEST" layout.  See how it works.  This **** is complicated and I probably messed something up, so test every key.  Make sure you use a healthy debounce and setup time.

If this doesn't work, I'm going to have to find a QFR to try for myself.
« Last Edit: Wed, 17 February 2016, 00:19:15 by metalliqaz »

Offline TheGlow

  • Posts: 48
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1428 on: Wed, 17 February 2016, 07:32:26 »
Okay so I reconfigured the frosty flake v2 file.  Just to make sure, I used bpiphany's exact layout from his latest code.  These costar boards are so scrambled, if I need to debug I'll use his arrangement.

Make sure you have the latest keymapper code.  Run it at least once.  Put the attached file in your C:\Users\<username>\.EasyAVR\boards .  Make a new config using the "Frosty Flake v2 TEST" layout.  See how it works.  This **** is complicated and I probably messed something up, so test every key.  Make sure you use a healthy debounce and setup time.

If this doesn't work, I'm going to have to find a QFR to try for myself.
I'm about to make a new layout now.
Has anyone else had this many issues you know of? bphiphany saidi I could swap it in the event its a bad one.
I feel bad taking up this much time if I'm the only victim.
Live in the wild, the i's in the previous sentence.
But then nit worked ok with his. And the n now. 

Edit: ok, keys look ok, so I'll ride this for a while and let you know how it comes out.
« Last Edit: Wed, 17 February 2016, 08:19:47 by TheGlow »

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1429 on: Wed, 17 February 2016, 08:41:15 »
Okay so I reconfigured the frosty flake v2 file.  Just to make sure, I used bpiphany's exact layout from his latest code.  These costar boards are so scrambled, if I need to debug I'll use his arrangement.

Make sure you have the latest keymapper code.  Run it at least once.  Put the attached file in your C:\Users\<username>\.EasyAVR\boards .  Make a new config using the "Frosty Flake v2 TEST" layout.  See how it works.  This **** is complicated and I probably messed something up, so test every key.  Make sure you use a healthy debounce and setup time.

If this doesn't work, I'm going to have to find a QFR to try for myself.
I'm about to make a new layout now.
Has anyone else had this many issues you know of? bphiphany saidi I could swap it in the event its a bad one.
I feel bad taking up this much time if I'm the only victim.
Live in the wild, the i's in the previous sentence.
But then nit worked ok with his. And the n now. 

Edit: ok, keys look ok, so I'll ride this for a while and let you know how it comes out.

You're not the only one.  A long time ago someone else spoke up about it.  I just increased the setup time and they stopped complaining.  I think if TMK and bpiphany's code both work, then it's not your controller.  I think it's just all of the frosty flakes in general.  My code really pushes the AVR to it's limits and apparently on this hardware it's too far.  Still, I'm quite sure it can work, it's just that when I don't own the hardware it seems to take forever.

Offline TheGlow

  • Posts: 48
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1430 on: Wed, 17 February 2016, 15:07:58 »
Okay so I reconfigured the frosty flake v2 file.  Just to make sure, I used bpiphany's exact layout from his latest code.  These costar boards are so scrambled, if I need to debug I'll use his arrangement.

Make sure you have the latest keymapper code.  Run it at least once.  Put the attached file in your C:\Users\<username>\.EasyAVR\boards .  Make a new config using the "Frosty Flake v2 TEST" layout.  See how it works.  This **** is complicated and I probably messed something up, so test every key.  Make sure you use a healthy debounce and setup time.

If this doesn't work, I'm going to have to find a QFR to try for myself.
I'm about to make a new layout now.
Has anyone else had this many issues you know of? bphiphany saidi I could swap it in the event its a bad one.
I feel bad taking up this much time if I'm the only victim.
Live in the wild, the i's in the previous sentence.
But then nit worked ok with his. And the n now. 

Edit: ok, keys look ok, so I'll ride this for a while and let you know how it comes out.

You're not the only one.  A long time ago someone else spoke up about it.  I just increased the setup time and they stopped complaining.  I think if TMK and bpiphany's code both work, then it's not your controller.  I think it's just all of the frosty flakes in general.  My code really pushes the AVR to it's limits and apparently on this hardware it's too far.  Still, I'm quite sure it can work, it's just that when I don't own the hardware it seems to take forever.
I have debounce on 6 and matrix wait on 20. I think its working about the same as previously. I get some on occasion, and it seems to be h's, spacebar mostly, sometimes i. I had one case of U.

When creating the layout I ichoose ansi 87. Should I try something else? and looks like an I again just now.

Edit: 1st email of the day and I had 3 of them, so not sure what the deal is.
painful weirid for me.   weird
I barely goto wins.   got
charges hehr next    her.   Im wondering if its combinations of keys that trigger the duplicate before it.
Also not sure if it matters when I flash the tmk firm it says its using 0x3A80 bytes of 0x7000, 52.23%.
Yours states x6780 bytes, 92.41%.

« Last Edit: Thu, 18 February 2016, 08:03:45 by TheGlow »

Offline brentnycum

  • Posts: 3
  • Location: Shreveport, LA
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1431 on: Thu, 18 February 2016, 21:25:33 »
I played around with the customizing the firmware to work properly on the Mac. Previous and Next Track keycodes worked with iTunes just fine, but not anything else like Spotify. What I found is that the Rewind (0xB4) and Fast Foward (0xB3) keycodes should be sent instead. Just as a quick dirty hack I modified SC_WIN_CP_NEXT_TRACK and SC_WIN_CP_PREV_TRACK to these values, and they work correctly. Spotify seems happy, iTunes still works as well.

Scroll Lock and Pause will decrease and increase monitor brightness respectively for anyone interested and wasn't aware. The Mac will take those keys and make them F14 and F15, and Print Screen should be F13. F14 and F15 are the default Brightness controls set by the OS. I was trying to assign additional function keys but the Mac will not pick up any of the function keys higher than F12, I'm still looking into that.

I'm using a QFR with a Frosty Flake v2, love it with no real issues to complain about. The firmware works great otherwise.

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1432 on: Thu, 18 February 2016, 21:43:05 »
I played around with the customizing the firmware to work properly on the Mac. Previous and Next Track keycodes worked with iTunes just fine, but not anything else like Spotify. What I found is that the Rewind (0xB4) and Fast Foward (0xB3) keycodes should be sent instead. Just as a quick dirty hack I modified SC_WIN_CP_NEXT_TRACK and SC_WIN_CP_PREV_TRACK to these values, and they work correctly. Spotify seems happy, iTunes still works as well.

Scroll Lock and Pause will decrease and increase monitor brightness respectively for anyone interested and wasn't aware. The Mac will take those keys and make them F14 and F15, and Print Screen should be F13. F14 and F15 are the default Brightness controls set by the OS. I was trying to assign additional function keys but the Mac will not pick up any of the function keys higher than F12, I'm still looking into that.

I'm using a QFR with a Frosty Flake v2, love it with no real issues to complain about. The firmware works great otherwise.

I have never owned a Mac, so I know that my Mac support is weak.  All the media keys were added using Microsoft's guidance.  Thanks for this input.  Perhaps Mac support can be added.

Offline brentnycum

  • Posts: 3
  • Location: Shreveport, LA
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1433 on: Thu, 18 February 2016, 22:47:40 »
I played around with the customizing the firmware to work properly on the Mac. Previous and Next Track keycodes worked with iTunes just fine, but not anything else like Spotify. What I found is that the Rewind (0xB4) and Fast Foward (0xB3) keycodes should be sent instead. Just as a quick dirty hack I modified SC_WIN_CP_NEXT_TRACK and SC_WIN_CP_PREV_TRACK to these values, and they work correctly. Spotify seems happy, iTunes still works as well.

Scroll Lock and Pause will decrease and increase monitor brightness respectively for anyone interested and wasn't aware. The Mac will take those keys and make them F14 and F15, and Print Screen should be F13. F14 and F15 are the default Brightness controls set by the OS. I was trying to assign additional function keys but the Mac will not pick up any of the function keys higher than F12, I'm still looking into that.

I'm using a QFR with a Frosty Flake v2, love it with no real issues to complain about. The firmware works great otherwise.

I have never owned a Mac, so I know that my Mac support is weak.  All the media keys were added using Microsoft's guidance.  Thanks for this input.  Perhaps Mac support can be added.

Actually for the most part everything works. Just had to swap those keys around for Media playback to function properly. I haven't had an issue with anything else but the function keys. If I figure out anything on that I'll let you know. I'm using it full time on an iMac with 3 layers and nothing bad to say. I had more trouble installing the Atmel Studio as I selected the wrong chip support the first go round.

Offline knowsnokb

  • Posts: 35
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1434 on: Fri, 19 February 2016, 08:51:59 »
Can I run Easy AVR USB keyboard firmware and keymapper on my Raspberry Pi?

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1435 on: Fri, 19 February 2016, 09:04:46 »
Can I run Easy AVR USB keyboard firmware and keymapper on my Raspberry Pi?

You can run the keymapper on your rPi, sure.  If you've already got a Linux distro installed you almost certainly have python installed.  You can just get the source and run the included shell script.

The firmware itself only runs on keyboards.

If you want to hack on and compile the firmware, it can be done, but not without a bunch of experience coding in Linux.

Offline knowsnokb

  • Posts: 35
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1436 on: Fri, 19 February 2016, 09:29:39 »
Can I run Easy AVR USB keyboard firmware and keymapper on my Raspberry Pi?

You can run the keymapper on your rPi, sure.  If you've already got a Linux distro installed you almost certainly have python installed.  You can just get the source and run the included shell script.

The firmware itself only runs on keyboards.

If you want to hack on and compile the firmware, it can be done, but not without a bunch of experience coding in Linux.

Cool. Wanted to program a possible JD45 using the rPi. Great thing Easy AVR works on the Pi. Appreciate the answer. :thumb:

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1437 on: Fri, 19 February 2016, 09:36:35 »
Can I run Easy AVR USB keyboard firmware and keymapper on my Raspberry Pi?

You can run the keymapper on your rPi, sure.  If you've already got a Linux distro installed you almost certainly have python installed.  You can just get the source and run the included shell script.

The firmware itself only runs on keyboards.

If you want to hack on and compile the firmware, it can be done, but not without a bunch of experience coding in Linux.

Cool. Wanted to program a possible JD45 using the rPi. Great thing Easy AVR works on the Pi. Appreciate the answer. :thumb:

I will be updating the EasyAVR tool in preparation for the JD45 sale.  So you can be sure a solution will be in place to make programming as easy as possible.  I'm adding support for Wilba's new PCBs and I will be (finally) writing better documentation to explain exactly how to get started using it.

Note, though, that windows is still much easier because you can use Atmel's Flip tool to do the programming.  On Linux you have to use dfu-programmer.

Offline CPTBadAss

  • Woke up like this
  • Posts: 14365
    • Tactile Zine
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1438 on: Fri, 19 February 2016, 10:14:01 »
Stupid question time:

I'm in the process of building one of Hasu's TMK Alps64 PCBs. If I understand correctly, since the Alps64 has a ATMega32U2, EasyAVR will support the PCB. Is this true? I wasn't sure if you needed the hardware in hand before being able to update EasyAVR metalliqaz.

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1439 on: Fri, 19 February 2016, 10:16:37 »
Stupid question time:

I'm in the process of building one of Hasu's TMK Alps64 PCBs. If I understand correctly, since the Alps64 has a ATMega32U2, EasyAVR will support the PCB. Is this true? I wasn't sure if you needed the hardware in hand before being able to update EasyAVR metalliqaz.

Yes it is supported.  Some hacking would be required to add a suitable size for that target, but the effort is minimal.  I'm happy to help you out with support if you want.  You'd have to be the tester.

Offline CPTBadAss

  • Woke up like this
  • Posts: 14365
    • Tactile Zine
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1440 on: Fri, 19 February 2016, 10:17:50 »
I'd be happy to be the guinea pig but I'm really bad with coding. You'll have to suffer through a lot of stupid questions. I'm game if you are though.

Offline knowsnokb

  • Posts: 35
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1441 on: Fri, 19 February 2016, 10:19:20 »

I will be updating the EasyAVR tool in preparation for the JD45 sale.  So you can be sure a solution will be in place to make programming as easy as possible.  I'm adding support for Wilba's new PCBs and I will be (finally) writing better documentation to explain exactly how to get started using it.

Note, though, that windows is still much easier because you can use Atmel's Flip tool to do the programming.  On Linux you have to use dfu-programmer.

Clear, easy to follow documentation would be awesome.
Does it have to dfu-programmer? what about dfu-util? or the teansy loader? So many options  :confused:. But hope you also include this info in your documentation

Thank you

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1442 on: Fri, 19 February 2016, 10:26:12 »

I will be updating the EasyAVR tool in preparation for the JD45 sale.  So you can be sure a solution will be in place to make programming as easy as possible.  I'm adding support for Wilba's new PCBs and I will be (finally) writing better documentation to explain exactly how to get started using it.

Note, though, that windows is still much easier because you can use Atmel's Flip tool to do the programming.  On Linux you have to use dfu-programmer.

Clear, easy to follow documentation would be awesome.
Does it have to dfu-programmer? what about dfu-util? or the teansy loader? So many options  :confused:. But hope you also include this info in your documentation

Thank you

On boards that use Teensy controllers, the Teensy loader must be used.  They have good instructions on their webpage.  I will link to it in my documentation.

On other USB AVR boards, any DFU programming tool should work.  I'm not familiar with any of them because I always use Flip in Windows.  I will try to find some Linux users to help me write up instructions for programming on Linux.


Offline bpiphany

  • Posts: 1033
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1443 on: Sat, 20 February 2016, 07:06:27 »
I was just browsing the thread to stay somewhat updated. Think I saw something about figuring existing matrices out. A while back I wrote a simple code for the Teensy++ (really any of the ATmegas with some modifications) to reverse engineer matrices. Since the Teensy++ has enough GPIO pins to go around it's a simple thing to just let it do the work.

Pressing one key at a time, the program simply outputs which pins on the Teensy that are connected. The direction of the diodes will also follow (with some understanding of what's happening). If it is a diode-less matrix, both A->B and B->A will indicate at the same time for each key.

https://github.com/BathroomEpiphanies/matrix_mapper

Just thought I would post about that if it can help anyone out. I definitely used it once or twice to figure the Costar boards out =)

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1444 on: Sun, 21 February 2016, 08:43:50 »
Linux user checking in :)

GH60

Install dfu-programmer e.g. on Debian/Ubuntu
Code: [Select]
sudo apt-get install dfu-programmer
Press the button on the PCB, wait a couple of seconds then run this - timing may take some practice
Code: [Select]
sudo dfu-programmer atmega32u4 erase
Once erased there's no need to press the button, wait about 10 seconds (no idea why, but I've had probelms if I didn't...) then run this to flash your hex
Code: [Select]
sudo dfu-programmer atmega32u4 flash /path/to/exported.hex

Arduino Micro (original, not Pro Micro clone)

Install avrdude e.g. on Debian/Ubuntu
Code: [Select]
sudo apt-get install avrdude
Plug in USB then run
Code: [Select]
dmesg | tail
This shows system messages, the output will look something like this:
Code: [Select]
[  875.048603] usb 5-1.6.2: USB disconnect, device number 9
[  875.264373] usb 5-1.6.2: new full-speed USB device number 10 using ehci-pci
[  875.376897] usb 5-1.6.2: New USB device found, idVendor=2341, idProduct=8037
[  875.376910] usb 5-1.6.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  875.376912] usb 5-1.6.2: Product: Arduino Micro
[  875.376914] usb 5-1.6.2: Manufacturer: Arduino LLC
[  875.377303] cdc_acm 5-1.6.2:1.0: This device cannot do calls on its own. It is not a modem.

[  875.377322] cdc_acm 5-1.6.2:1.0: ttyACM0: USB ACM device

[  875.380327] input: Arduino LLC Arduino Micro as /devices/pci0000:00/0000:00:1a.0/usb5/5-1/5-1.6/5-1.6.2/5-1.6.2:1.2/0003:2341:8037.000D/input/input28
[  875.380939] hid-generic 0003:2341:8037.000D: input,hidraw7: USB HID v1.01 Mouse [Arduino LLC Arduino Micro] on usb-0000:00:1a.0-1.6.2/input2

I've added spaces around the important line, in my case ttyACM0 is the SERIAL PORT to use below.  Press the button on the Ardunino then run this to flash your .hex

Code: [Select]
sudo avrdude -DV -p  atmega32u4 -P /dev/SERIAL PORT -c avr109 -b 57600 -U flash:w:/path/to/exported.hex :i
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1445 on: Sun, 21 February 2016, 10:37:36 »
Thanks dude. With your permission I'd like to add it to the readme.

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1446 on: Sun, 21 February 2016, 10:44:33 »
Please do :)
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline FletchINKy

  • Posts: 61
  • Troy Fletcher, Kentucky USA
    • Troy Fletcher Dot Net
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1447 on: Tue, 23 February 2016, 08:44:57 »
Is there a way to gracefully manage more than one handwired matrix?

At the moment it seems to only support one handwire_hardware.cfg file, and making multiple copies of the Easy AVR folders is the workaround.

Or is it expected that a standard pin/row assignment be used, and the wiring and visual layout be conformed to that?

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1448 on: Tue, 23 February 2016, 09:29:23 »
Is there a way to gracefully manage more than one handwired matrix?

At the moment it seems to only support one handwire_hardware.cfg file, and making multiple copies of the Easy AVR folders is the workaround.

Or is it expected that a standard pin/row assignment be used, and the wiring and visual layout be conformed to that?

Absolutely, there is.  The new, open source code is very customizable and you can add as many custom boards as you want.   It doesn't use the handwire_config.cfg file.  It is working and I use the new version every day.  The only thing I haven't done is write the documentation and update the wikis.  I'm working on it, but if you know how to use python and github, you can use it now.  I'm hoping to have a windows executable any day now.  I'm just having trouble getting it to work with Windows 10.


Offline FletchINKy

  • Posts: 61
  • Troy Fletcher, Kentucky USA
    • Troy Fletcher Dot Net
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #1449 on: Tue, 23 February 2016, 09:42:13 »
Awesome! I'll dig in!

Also, what's the policy on officially supporting/adding boards? Just a finalized PCB?

EDIT: LOVE the layout config with customizable matrix!

I can run it on W7 with the run.bat, but it's missing the stuff in the boards directory. I assume I need to get atmel studio and compile?
« Last Edit: Tue, 23 February 2016, 11:06:48 by FletchINKy »