mattjlewis / diozero

Java Device I/O library that is portable across Single Board Computers and microcontrollers. Tested with Raspberry Pi, Odroid C2, BeagleBone Black, Next Thing CHIP, Asus Tinker Board and Arduinos / Pico. Supports GPIO, I2C, SPI as well as Serial communication. Also known to work with Udoo Quad.
https://www.diozero.com
MIT License
261 stars 59 forks source link

Completely refactor the stepper motors. #153

Closed EAGrahamJr closed 1 year ago

EAGrahamJr commented 1 year ago

Fixes #147 (well, not really: apparently not recommended because it's slow)

Confusion between motor types and controller types resolved. Note that the "basic" stepper does not have any "speed controls": this is due to large variations in hardware controller implementations, even though they do "the same thing".

mattjlewis commented 1 year ago

Appreciating the input - will aim to finally connect up my one and only stepper motor this week to test

EAGrahamJr commented 1 year ago

I have some more hardware coming that will allow me to re-test the BasicStepper via GPIO timing (I'm using a CRICKITHat right now and it's slooooowwwww for a 28BYJ-48). I'm trying not to touch the SilentStepStick too much because I seem to have misplaced my driver chip.

EAGrahamJr commented 1 year ago

This is ready for review/merge. Added a couple of "test classes" and made the sample apps build a "fat jar" (I do my work on the desktop and run stuff on a Pi).