Back to engineering archive

Record 007 / Firmware and control

Dual-stepper limit-switch sequence draft

An archived sketch advances two steppers in chunks, waits when both front inputs are low, then returns each motor in turn. Pin conflicts and blocking waits remain in this revision.

Archived firmware draft
Stepper APILimit-switch inputsBlocking motion

Archived source flow

Archived two-stepper command sequence. Configure speeds and pull-up inputs, command forward chunks while either front input is high, wait three seconds, then reverse each motor until its rear input is low. Pin conflicts and missing timeout handling remain; no physical motion result is established.
Selected movement-command paths reconstructed from archived source. Pin conflicts and missing timeout handling remain; hardware operation is unverified. View diagram at full size

Technical notes

Forward and return paths

Each high front-limit input causes a forward step chunk. Once both are low, the sketch waits three seconds, returns motor 1 until its rear input is low, then returns motor 2. The next loop starts again.

Configuration and pin conflict

Initial and reverse speeds are separate settings, but the code does not restore the initial speed before later forward cycles. Two motor-drive pins are also assigned to front-limit inputs.

Draft limits

The waits are blocking, with no timeout or fault-stop path. There is no implemented external start/stop trigger or separate startup-homing routine. This is archived code behaviour, not proof of a safe or working motion system.

Engineering archiveArchive record

Project enquiries

Discuss your project.

Tell us what you’re developing and where you need engineering support.

Discuss your project