PropWare
C++ objects and CMake build system for Parallax Propeller
Home
Download
Getting Started
Documentation
Reference
About
Related Links
Namespace List
Class List
File List
Examples
Build System
File List
File Members
Examples
PropWare_Stepper
Stepper_Demo.cpp
Go to the documentation of this file.
1
26
// Includes
27
#include <
PropWare/PropWare.h
>
28
#include <
PropWare/motor/stepper.h
>
29
37
int
main
() {
38
PropWare::Stepper
stepper(
PropWare::Port::P1
,
PropWare::Port::P2
,
PropWare::Port::P3
,
PropWare::Port::P4
);
39
40
stepper.step_forward(10);
// Step forward 10 steps
41
stepper.step_reverse(15);
// Step back 15 steps
42
stepper.step_forward(5,
PropWare::Stepper::DEFAULT_DELAY
/ 2);
// Step forward 5 steps, but do it twice as fast
43
44
return
0;
45
}
PropWare::Port::P3
Definition:
port.h:44
stepper.h
PropWare::Port::P2
Definition:
port.h:43
PropWare::Port::P1
Definition:
port.h:42
PropWare::Stepper
4-phase stepper motor driver
Definition:
stepper.h:41
main
int main(void)
Definition:
GraphicsTest.c:20
PropWare.h
PropWare::Stepper::DEFAULT_DELAY
static const unsigned int DEFAULT_DELAY
Default delay in microseconds used between each step.
Definition:
stepper.h:46
PropWare::Port::P4
Definition:
port.h:45
Generated on Sat Aug 27 2016 00:58:03 for PropWare by
1.8.12