Skip to content

Commit

Permalink
extending usage description
Browse files Browse the repository at this point in the history
  • Loading branch information
sq7bti committed Jan 15, 2015
1 parent b277923 commit 2dfc98d
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,29 @@ Within Energia on LM4F target there are only two timers available for free use:
- // SYSCTL_PERIPH_TIMER5, // wiring.c - millis() micros()
- // SYSCTL_PERIPH_TIMER6,
- // SYSCTL_PERIPH_TIMER7

To sum up, both the original AccelStepper and iAccelStepper library should be located in your library folder, not neceserily in a common folder:
${ENERGIA_PROJECT}/sketches
${ENERGIA_PROJECT}/libraries/AccelStepper/AccelStepper.cpp
${ENERGIA_PROJECT}/libraries/AccelStepper/AccelStepper.h
${ENERGIA_PROJECT}/libraries/iAccelStepper/iAccelStepper.cpp
${ENERGIA_PROJECT}/libraries/iAccelStepper/iAccelStepper.h

In the main ino file one need to include both header files:
```
#include "AccelStepper.h"
#include "iAccelStepper.h"
```

Instantiation of object boils down to an empty declaration:
```
iAccelStepper axis1;
iAccelStepper axis2;
```
setup() should contain initialisation call:
```
axis1.begin(PB_0, PB_5);
axis2.begin(PE_4, PB_1);
```
To perform any movement, the usual methods of the original AccelStepper should be used, such as move(), moveTo() and stop(). The difference is iAccelStepper _DO_NOT_REQUIRE_ call run() method. See example for more.

0 comments on commit 2dfc98d

Please sign in to comment.