finds.dev← search

// the find

Nikolay-Kha/PyCNC

★ 645 · Python · MIT · updated Jul 2022

Python CNC machine controller for Raspberry Pi and other ARM Linux boards

PyCNC is a G-code interpreter and CNC/3D-printer controller written in Python for Raspberry Pi and similar ARM boards. It sidesteps Linux's real-time limitations by offloading stepper pulse generation to the DMA controller, which lets Python drive motors with precise timing without a dedicated microcontroller. Aimed at hobbyists who want to build their own CNC or 3D printer without the Arduino/GRBL stack.

The DMA trick is genuinely clever — using the Pi's DMA engine to clock GPIO state changes means pulse timing is hardware-accurate regardless of Python GIL pauses or kernel scheduling jitter. Zero runtime dependencies: pure Python, no native extensions needed. The virtual HAL layer makes it possible to simulate and test G-code execution without physical hardware. PID-based heater control with a model-fitting utility included means you can actually tune your thermistor loop rather than guessing constants.

Last commit was 2022 and the project appears abandoned — RPi 4/5 support is absent, and the DMA register layout changed between Pi generations in ways that break the existing hal_raspberry implementation on newer hardware. PyPy is effectively required for any real cutting speed (the README admits CPython caps out around 800 mm/min), which adds friction and limits ecosystem compatibility. G-code support is shallow: no G2/G3 in all planes, no canned drilling cycles, no tool radius compensation — fine for basic 3D printing, limiting for actual milling. Configuration is a single Python file with magic GPIO numbers; there's no runtime configuration, no web UI, and no way to jog or probe without writing G-code manually.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →