TL;DR
- Design not only the firmware, but also the schematic (netlist), PCB, and case all in Python.
- Mainly introduce the design flow (please read the documentation and source code for the detailed)
- The code will be explained in a runnable jupyter notebook (google colaboratory) environment. See Build Instructions.
- The libraries to be used are as follows
Circuit | skidl |
PCB | pcbflow(my folk) |
Case | cadquery |
Firmware | KMK Firmware, circuitpython |
Why make a keyboard with Python?
Python is a programming language. It is designed with a focus on creating useful programs that are easy to write and read.
Of course, it can be extended with all kinds of libraries to create not only computer-like behaviors such as complex calculations, image processing, and machine learning, but also games, music, pictures, and anything else you can want to create. Python is used in almost anything that has the name "AI", and the image generation AI that has been making the rounds recently is also running in Python.
There are also libraries for drawing schematics, wiring PCBs, creating 3D models, and even running microcontrollers in Python.
The advantage of designing something
by writing code
, not just Python, is that the design is character-based information. It can be understood and designed using only a text editor without special things (schematic symbols, etc.) to be aware of. When you collaborate with someone else, you can use git's powerful version control and diff extraction, so it is easy to do so.
And since the code for the design is a program, let the computer do the complex calculations and repetition of the same values and sections. It is less mistake and easier to make changes.
This looks really cool! A while back I was working on an OS/UI/App Engine for things like this in MicroPython, but never got around to doing any hardware for it.
Maybe it could be useful here? https://youtu.be/wR3AkhD0nEg