Description
This project is a lightweight, blocking stepper motor driver written in C for classic 8-bit AVR microcontrollers. It allows the user to control unipolar stepper motors with direct GPIO manipulation and fixed-point math (no interrupts, no floating point, no timer occupation). The driver supports multiple stepping modes and enforces a clean initialization and error-handling model to keep misuse obvious and bugs contained.
While it the driver intentionally avoids advanced features, it is an excellent addition to simple automation projects which requires the sequential use of multiple motors. I've recently been developing ATMega328 firmware for a dual-axis solar-tracking battery charger, which uses this driver to control two stepper motors to follow the sun's position through the sky.
The video to the right shows the driver in action, as I use it to implement simple pushbutton control for a 28BYJ-48 5V stepper motor on an ATMEGA328P microcontroller.
A full technical breakdown, usage examples, and future directions are documented in the project README. I encourage you to explore the source code and documentation on my GitHub repository!