PropWare  3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Stepper_Demo.cpp

Move a stepper motor forward and backward at different speeds.

cmake_minimum_required(VERSION 3.12)
find_package(PropWare REQUIRED)
project(Stepper_Demo)
create_simple_executable(${PROJECT_NAME} Stepper_Demo.cpp)
// Includes
int main () {
Stepper stepper(Port::P1, Port::P2, Port::P3, Port::P4);
stepper.step_forward(10); // Step forward 10 steps
stepper.step_reverse(15); // Step back 15 steps
stepper.step_forward(5, Stepper::DEFAULT_DELAY / 2); // Step forward 5 steps, but do it twice as fast
return 0;
}
PropWare::Stepper
4-pin bipolar and 5-pin unipolar stepper motor driver
Definition: stepper.h:35
PropWare::Port
Flexible port that can have any pin enabled or disabled. Pins are independent of each other.
Definition: port.h:38
main
int main(void)
Definition: GraphicsTest.c:20
PropWare.h
stepper.h
Stepper
Definition: Stepper.h:49
PropWare
Generic definitions and functions for the Parallax Propeller.
Definition: runnable.h:33