Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: 16A_Autopancakemaker
Revision 2:ad11f550b379, committed 2010-11-03
- Comitter:
- franzachatz
- Date:
- Wed Nov 03 18:41:28 2010 +0000
- Parent:
- 1:ef0414c3ce83
- Commit message:
- added some doc
Changed in this revision
| stepper.cpp | Show annotated file Show diff for this revision Revisions of this file | 
| stepper.h | Show annotated file Show diff for this revision Revisions of this file | 
--- a/stepper.cpp Tue Nov 02 10:29:48 2010 +0000 +++ b/stepper.cpp Wed Nov 03 18:41:28 2010 +0000 @@ -26,7 +26,7 @@ #define START_STOP_SPEED 300 // define Library version number -#define VERSION 0.2 +#define VERSION 0.3 // led4, used for testing the direction signal DigitalOut led4(LED4);
--- a/stepper.h	Tue Nov 02 10:29:48 2010 +0000
+++ b/stepper.h	Wed Nov 03 18:41:28 2010 +0000
@@ -29,7 +29,7 @@
  * Example:
  * @code
  * // apply number of steps, direction, speed and 
- * // a linear accelleration on/off to a Stepper Motor Controller
+ * // a linear acceleration/deceleration to a Stepper Motor Controller
  * #include "mbed.h"
  * #include "stepper.h"
  *
@@ -37,9 +37,9 @@
  * #define ACCEL_OFF 0
  * #define SPEED 100
  * 
- * stepper x(p18,p21);
- * stepper y(p19,p22);
- * stepper z(p20,p23);
+ * stepper x(P18,P21);
+ * stepper y(P19,P22);
+ * stepper z(P20,P23);
  *
  * int main()
  * {
@@ -62,12 +62,13 @@
     stepper(PinName clk, PinName dir);
     
     /** Set number of steps to direction with speed and 
-     *  a linear accelleration on/off to a Stepper Motor Controller
+     *  a linear acceleration/deceleration [on/off] 
+     *  to a Stepper Motor Controller
      *
      * @param n_steps number of steps to go
      * @param direction 1 or 0
      * @param time value for value in us
-     * @param accel 1 or 0 for accel on/off
+     * @param accel 1 or 0 for accel/decel [on/off]
      */
     void step(int n_steps, bool direction, int speed, bool accel);