// readme

latheControl

Code for controlling a lathe’s lead screw (Z-axis) with a stepper motor.

Now also will control the X-axis (cross-slide).

Allows for cutting threads, tapers, and general automated operations.

Intended to be an aid for manual machining, rather than full CNC operation.

Getting the Code

Just git clone <repo URL>. Everything is in this repository: the stepper motor code (steppermotor.*, and the GPIO in igpio.h, gpio.* and mockgpio.h) used to be a separate library, stepperControl, which was moved in at its v1.5.1, once the electronicRotaryTable program (its only other user) was replaced by gear cutting mode. That repository is kept for its history.

Dependencies

You’ll need to do the following (on deb-based systems) to install required packages:

sudo apt install cmake libfmt-dev qt6-base-dev

on a Mac, you can use homebrew (if you’ve got it installed):

brew install cmake fmt qt

The user interface uses Qt 6 (Widgets), which is available from the standard repositories on Raspberry Pi OS Bookworm or later.

Building

To make a binary to run on non-Pi hardware, just type make. This mocks out…