Code Monkey home page Code Monkey logo

kicad-keyboard-matrix-generator's Introduction

create_key_matrix.py

THIS SCRIPT IS NOT COMPATIBLE WITH KICAD V6 FILES!!!!

Examples:

6x10 matrix with diodes pointing at the collumns:

/home/user/kicad_projects/60key_keyboard/$ create_key_matrix.py -r 6 -c 10 -t "Keyboard matrix" -rl "key_row" -cl "key_col" --revDiode 60key_keyboard.sch
Found a KiCad schematic file!
Creating 2x10 matrix... in /home/user/kicad_projects/60key_keyboard/60key_keyboard.sch
■ ■ ■ ■ ■ ■ ■ ■ ■ ■
■ ■ ■ ■ ■ ■ ■ ■ ■ ■
Done!

KiCad

Imgur

output only the matrix to a file via stdout

$ create_key_matrix.py -r 6 -c 10 -t "Keyboard matrix" -rl "key_row" -cl "key_col" --revdiode > matrix.txt

All parameters:

$ create_key_matrix.py -h
usage: create_key_matrix.py [-h] -r NUMROWS -c NUMCOLS [-x XPOS] [-y YPOS]
                            [-t TITLE] [-rl ROWLABEL] [-cl COLLABEL]
                            [-df DFOOTPRINT] [-sf SFOOTPRINT] [-rd] [-v]
                            [output]

Generate a switch/ diode key matrix in EEschema by Arjen Klaverstijn

positional arguments:
  output                Output schematic file (*.sch), it will insert the
                        matrix into it! (default: <open file '<stdout>', mode
                        'w' at 0x01CC5078>)

optional arguments:
  -h, --help            show this help message and exit
  -r NUMROWS, --numRows NUMROWS
                        The number of rows (default: None)
  -c NUMCOLS, --numCols NUMCOLS
                        The number of collumns (default: None)
  -x XPOS, --xPos XPOS  The x position of the first switch in the matrix
                        (default: 0)
  -y YPOS, --yPos YPOS  The y position of the first switch in the matrix
                        (default: 0)
  -t TITLE, --title TITLE
                        Title label for the matrix (default: Key Matrix)
  -rl ROWLABEL, --rowLabel ROWLABEL
                        Row label prefix (default: row)
  -cl COLLABEL, --colLabel COLLABEL
                        Row label prefix (default: col)
  -df DFOOTPRINT, --dFootprint DFOOTPRINT
                        Diode footprint association (default: )
  -sf SFOOTPRINT, --sFootprint SFOOTPRINT
                        Switch footprint association (default: )
  -rd, --revDiode       Reverse diode direction (default: False)
  -v, --version         show program's version number and exit

kicad-keyboard-matrix-generator's People

Contributors

arjhun avatar maxr1998 avatar shintakezou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

kicad-keyboard-matrix-generator's Issues

Symbols appear as "??"

When opening the schematic, KICAD opens the Remap symbols dialogue as it cannot connect the generated matrix to the symbols.

  • If I tell it to remap symbols, all symbols are "??"
  • If I tell it to close the dialogue without remapping, all the symbols are still "??"

symbol problems

To fix, I have to edit each symbol properties and reassign symbol.

KICAD version: (5.1.5)-3 release build
Script version used: release of Dec 2019
Python interpreter: WinPython 3.8 (https://winpython.github.io/) - IDLE (Python GUI).exe

"SW?" "D?"

Switch and Diode ID labels don't seem to generate. Is this what eeschema.createId() is supposed to do? They are shown this way in the readme image aswell.

Doesn't work with Kicad 6 or Nightly

Application: Editeur de Schématique KiCad (64-bit)

Version: (6.0.0-rc1-306-g01eebd0b9d), release build

Libraries:
	wxWidgets 3.1.5
	libcurl/7.78.0-DEV Schannel zlib/1.2.11

Platform: Windows 10 (build 19043), 64-bit edition, 64 bit, Little endian, wxMSW

Build Info:
	Date: Dec  3 2021 00:00:11
	wxWidgets: 3.1.5 (wchar_t,wx containers)
	Boost: 1.76.0
	OCC: 7.5.0
	Curl: 7.78.0-DEV
	ngspice: 35
	Compiler: Visual C++ 1929 without C++ ABI

Build settings:
	KICAD_USE_OCC=ON
	KICAD_SPICE=ON

Tried this script with the "last" Kicad version and have this error :
Not a KiCad EEschema file! exiting!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.