Main Content

Keyboard as a Python Code

A keyboard designed by python only.

Python is one of the best programming languages. It can do everything. So I have designed the entire keyboard, including the PCB, case, and firmware, using only Python. No need to use Kicad and Fusion360. It is explained on Jupyter Notebook(Google Colaboratory or binder), and you can customize it to make your own keyboard.

- 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

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.”

Link to article