Compare commits

...

6 Commits

Author SHA1 Message Date
Patrick
1255ab5682 update to 1.64
- 1.62 2022-05-22 Added link to AccelStepper - The Missing Manual.
- Fixed a problem when setting the maxSpeed to 1.0 due to incomplete initialisation. Reported by Olivier Pécheux.
- 1.63 2022-06-30 Added virtual destructor at the request of Jan.
- 1.64 2022-10-31 Patch courtesy acwest: Changes to make AccelStepper more subclassable. These changes are largely oriented to implementing new step-scheduling algorithms.
2022-11-23 20:19:36 -05:00
waspinator
a9bf2f93bf update to 1.61 2020-04-20
- Release under GPL V3 (1.60)
- Added yield() call in runToPosition(), so that platforms like esp8266 dont hang/crash during long runs.
2020-08-25 17:07:01 -04:00
waspinator
d54e55a358 1.59 2018-08-28 Update commercial licensing, remove binpress. 2019-09-25 14:30:44 -04:00
waspinator
b25c47ae8d
Update README.md 2018-04-18 21:24:29 -04:00
waspinator
47ad3aeafc
Update README.md 2018-04-18 21:21:44 -04:00
waspinator
5882093f46 updated to 1.58
Add initialisation for _enableInverted in constructor.
2018-04-14 14:21:10 -04:00
16 changed files with 1106 additions and 575 deletions

10
LICENSE
View File

@ -1,17 +1,17 @@
This software is Copyright (C) 2008 Mike McCauley. Use is subject to license
conditions. The main licensing options available are GPL V2 or Commercial:
This software is Copyright (C) Mike McCauley. Use is subject to license
conditions. The main licensing options available are GPL V3 or Commercial:
Open Source Licensing GPL V2
Open Source Licensing GPL V3
This is the appropriate option if you want to share the source code of your
application with everyone you distribute it to, and you also want to give them
the right to share who uses it. If you wish to use this software under Open
Source Licensing, you must contribute all your source code to the open source
community in accordance with the GPL Version 2 when your application is
community in accordance with the GPL Version 3 when your application is
distributed. See http://www.gnu.org/copyleft/gpl.html
Commercial Licensing
This is the appropriate option if you are creating proprietary applications
and you are not prepared to distribute and share the source code of your
application. Contact info@open.com.au for details.
application. Contact info@airspayce for details.

View File

@ -1,3 +1,9 @@
This fork follows the [upstream version](http://www.airspayce.com/mikem/arduino/AccelStepper/). Files are slightly reorganized to follow Arduino library conventions to allow for inclusion into the Arduino IDE library manager.
Please direct questions and discussion to http://groups.google.com/group/accelstepper
---
This is the Arduino AccelStepper library. It provides an object-oriented interface for 2, 3 or 4 pin stepper motors and motor drivers.
The standard Arduino IDE includes the Stepper library (http://arduino.cc/en/Reference/Stepper) for stepper motors. It is perfectly adequate for simple, single motor applications.
@ -14,6 +20,3 @@ AccelStepper significantly improves on the standard Arduino Stepper library in s
- Extensive API
- Subclass support
---
This fork follows the upstream version. Files are slightly reorganized to follow Arduino library conventions.

View File

@ -1,9 +1,10 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AccelStepper: Class List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
@ -25,21 +26,16 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li class="current"><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
@ -55,9 +51,7 @@
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>

View File

@ -1,9 +1,10 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AccelStepper: Member List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
@ -25,21 +26,16 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
@ -50,9 +46,11 @@
<p>This is the complete list of members for <a class="el" href="classAccelStepper.html">AccelStepper</a>, including all inherited members.</p>
<table class="directory">
<tr class="even"><td class="entry"><a class="el" href="classAccelStepper.html#a35162cdf8ed9a98f98984c177d5ade58">_direction</a></td><td class="entry"><a class="el" href="classAccelStepper.html">AccelStepper</a></td><td class="entry"><span class="mlabel">protected</span></td></tr>
<tr><td class="entry"><a class="el" href="classAccelStepper.html#a744fa74c2e181e75509a34b17c02e984">_stepInterval</a></td><td class="entry"><a class="el" href="classAccelStepper.html">AccelStepper</a></td><td class="entry"><span class="mlabel">protected</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classAccelStepper.html#a8b76f1ae6a49d2c2887b9fea30b8d84f">acceleration</a>()</td><td class="entry"><a class="el" href="classAccelStepper.html">AccelStepper</a></td><td class="entry"></td></tr>
<tr><td class="entry"><a class="el" href="classAccelStepper.html#a3bc75bd6571b98a6177838ca81ac39ab">AccelStepper</a>(uint8_t interface=AccelStepper::FULL4WIRE, uint8_t pin1=2, uint8_t pin2=3, uint8_t pin3=4, uint8_t pin4=5, bool enable=true)</td><td class="entry"><a class="el" href="classAccelStepper.html">AccelStepper</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classAccelStepper.html#afa3061ce813303a8f2fa206ee8d012bd">AccelStepper</a>(void(*forward)(), void(*backward)())</td><td class="entry"><a class="el" href="classAccelStepper.html">AccelStepper</a></td><td class="entry"></td></tr>
<tr><td class="entry"><a class="el" href="classAccelStepper.html#affbee789b5c19165846cf0409860ae79">computeNewSpeed</a>()</td><td class="entry"><a class="el" href="classAccelStepper.html">AccelStepper</a></td><td class="entry"><span class="mlabel">protected</span></td></tr>
<tr><td class="entry"><a class="el" href="classAccelStepper.html#aab5944f43f869675958939c421bd9a01">computeNewSpeed</a>()</td><td class="entry"><a class="el" href="classAccelStepper.html">AccelStepper</a></td><td class="entry"><span class="mlabel">protected</span><span class="mlabel">virtual</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classAccelStepper.html#a5dce13ab2a1b02b8f443318886bf6fc5">currentPosition</a>()</td><td class="entry"><a class="el" href="classAccelStepper.html">AccelStepper</a></td><td class="entry"></td></tr>
<tr><td class="entry"><a class="el" href="classAccelStepper.html#a7468f91a925c689c3ba250f8d074d228">Direction</a> enum name</td><td class="entry"><a class="el" href="classAccelStepper.html">AccelStepper</a></td><td class="entry"><span class="mlabel">protected</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classAccelStepper.html#a7468f91a925c689c3ba250f8d074d228a6959a4549f734bd771d418f995ba4fb4">DIRECTION_CCW</a> enum value</td><td class="entry"><a class="el" href="classAccelStepper.html">AccelStepper</a></td><td class="entry"><span class="mlabel">protected</span></td></tr>
@ -95,14 +93,15 @@
<tr><td class="entry"><a class="el" href="classAccelStepper.html#a8910bd9218a54dfb7e2372a6d0bcca0c">step4</a>(long step)</td><td class="entry"><a class="el" href="classAccelStepper.html">AccelStepper</a></td><td class="entry"><span class="mlabel">protected</span><span class="mlabel">virtual</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classAccelStepper.html#a4b0faf1ebc0c584ab606c0c0f66986b0">step6</a>(long step)</td><td class="entry"><a class="el" href="classAccelStepper.html">AccelStepper</a></td><td class="entry"><span class="mlabel">protected</span><span class="mlabel">virtual</span></td></tr>
<tr><td class="entry"><a class="el" href="classAccelStepper.html#aa909c6c3fcd3ea4b3ee1aa8b4d0f7e87">step8</a>(long step)</td><td class="entry"><a class="el" href="classAccelStepper.html">AccelStepper</a></td><td class="entry"><span class="mlabel">protected</span><span class="mlabel">virtual</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classAccelStepper.html#af8abc9ede47286fa33b518e0bf297c6a">stepBackward</a>()</td><td class="entry"><a class="el" href="classAccelStepper.html">AccelStepper</a></td><td class="entry"><span class="mlabel">protected</span></td></tr>
<tr><td class="entry"><a class="el" href="classAccelStepper.html#af4908b53e1821f0a6d2dab509257b3e6">stepForward</a>()</td><td class="entry"><a class="el" href="classAccelStepper.html">AccelStepper</a></td><td class="entry"><span class="mlabel">protected</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classAccelStepper.html#a638817b85aed9d5cd15c76a76c00aced">stop</a>()</td><td class="entry"><a class="el" href="classAccelStepper.html">AccelStepper</a></td><td class="entry"></td></tr>
<tr><td class="entry"><a class="el" href="classAccelStepper.html#a96685e0945b7cf75d5959da679cd911e">targetPosition</a>()</td><td class="entry"><a class="el" href="classAccelStepper.html">AccelStepper</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classAccelStepper.html#a89c4c8de0c983e7a59de6a959481aff1">~AccelStepper</a>()</td><td class="entry"><a class="el" href="classAccelStepper.html">AccelStepper</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">virtual</span></td></tr>
</table></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>

View File

@ -1,9 +1,10 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AccelStepper: AccelStepper Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
@ -25,21 +26,16 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
<div class="summary">
@ -62,17 +58,17 @@
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a73bdecf1273d98d8c5fbcb764cabeea5"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5">MotorInterfaceType</a> { <br />
&#160;&#160;<a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5af5bb99ad9d67ad2d85f840e3abcfe068">FUNCTION</a> = 0,
<a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5ac3523e4cf6763ba518d16fec3708ef23">DRIVER</a> = 1,
<a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5a62a305b52f749ff8c89138273fbb012d">FULL2WIRE</a> = 2,
<a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5a0b8eea5cf0f8ce70b1959d2977ccc996">FULL3WIRE</a> = 3,
&#160;&#160;<a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5af5bb99ad9d67ad2d85f840e3abcfe068">FUNCTION</a> = 0
, <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5ac3523e4cf6763ba518d16fec3708ef23">DRIVER</a> = 1
, <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5a62a305b52f749ff8c89138273fbb012d">FULL2WIRE</a> = 2
, <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5a0b8eea5cf0f8ce70b1959d2977ccc996">FULL3WIRE</a> = 3
, <br />
&#160;&#160;<a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5adedd394a375190a3df8d4519c0d4dc2f">FULL4WIRE</a> = 4
, <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5a00c2387a5af43d8e97639699ab7a5c7f">HALF3WIRE</a> = 6
, <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5aecc0900c55b777d2e885581b8c434b07">HALF4WIRE</a> = 8
<br />
&#160;&#160;<a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5adedd394a375190a3df8d4519c0d4dc2f">FULL4WIRE</a> = 4,
<a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5a00c2387a5af43d8e97639699ab7a5c7f">HALF3WIRE</a> = 6,
<a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5aecc0900c55b777d2e885581b8c434b07">HALF4WIRE</a> = 8
<br />
}<tr class="memdesc:a73bdecf1273d98d8c5fbcb764cabeea5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Symbolic names for number of pins. Use this in the pins argument the <a class="el" href="classAccelStepper.html" title="Support for stepper motors with acceleration etc. ">AccelStepper</a> constructor to provide a symbolic name for the number of pins to use. <a href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5">More...</a><br /></td></tr>
</td></tr>
}</td></tr>
<tr class="memdesc:a73bdecf1273d98d8c5fbcb764cabeea5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Symbolic names for number of pins. Use this in the pins argument the <a class="el" href="classAccelStepper.html" title="Support for stepper motors with acceleration etc.">AccelStepper</a> constructor to provide a symbolic name for the number of pins to use. <a href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5">More...</a><br /></td></tr>
<tr class="separator:a73bdecf1273d98d8c5fbcb764cabeea5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
@ -93,8 +89,10 @@ Public Member Functions</h2></td></tr>
<tr class="separator:abee8d466229b87accba33d6ec929c18f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6123a1dfb4495d8bd2646288eae60d7f"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAccelStepper.html#a6123a1dfb4495d8bd2646288eae60d7f">maxSpeed</a> ()</td></tr>
<tr class="separator:a6123a1dfb4495d8bd2646288eae60d7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adfb19e3cd2a028a1fe78131787604fd1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAccelStepper.html#adfb19e3cd2a028a1fe78131787604fd1">setAcceleration</a> (float acceleration)</td></tr>
<tr class="memitem:adfb19e3cd2a028a1fe78131787604fd1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAccelStepper.html#adfb19e3cd2a028a1fe78131787604fd1">setAcceleration</a> (float <a class="el" href="classAccelStepper.html#a8b76f1ae6a49d2c2887b9fea30b8d84f">acceleration</a>)</td></tr>
<tr class="separator:adfb19e3cd2a028a1fe78131787604fd1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8b76f1ae6a49d2c2887b9fea30b8d84f"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAccelStepper.html#a8b76f1ae6a49d2c2887b9fea30b8d84f">acceleration</a> ()</td></tr>
<tr class="separator:a8b76f1ae6a49d2c2887b9fea30b8d84f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae79c49ad69d5ccc9da0ee691fa4ca235"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAccelStepper.html#ae79c49ad69d5ccc9da0ee691fa4ca235">setSpeed</a> (float <a class="el" href="classAccelStepper.html#a4f0989d0ae264e7eadfe1fa720769fb6">speed</a>)</td></tr>
<tr class="separator:ae79c49ad69d5ccc9da0ee691fa4ca235"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4f0989d0ae264e7eadfe1fa720769fb6"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAccelStepper.html#a4f0989d0ae264e7eadfe1fa720769fb6">speed</a> ()</td></tr>
@ -129,23 +127,31 @@ Public Member Functions</h2></td></tr>
<tr class="separator:a38298ac2dd852fb22259f6c4bbe08c94"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a60cc0b962f8ceb81ee1e6f36443ceb"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAccelStepper.html#a3a60cc0b962f8ceb81ee1e6f36443ceb">isRunning</a> ()</td></tr>
<tr class="separator:a3a60cc0b962f8ceb81ee1e6f36443ceb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89c4c8de0c983e7a59de6a959481aff1"><td class="memItemLeft" align="right" valign="top"><a id="a89c4c8de0c983e7a59de6a959481aff1"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAccelStepper.html#a89c4c8de0c983e7a59de6a959481aff1">~AccelStepper</a> ()</td></tr>
<tr class="memdesc:a89c4c8de0c983e7a59de6a959481aff1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Virtual destructor to prevent warnings during delete. <br /></td></tr>
<tr class="separator:a89c4c8de0c983e7a59de6a959481aff1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-types"></a>
Protected Types</h2></td></tr>
<tr class="memitem:a7468f91a925c689c3ba250f8d074d228"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAccelStepper.html#a7468f91a925c689c3ba250f8d074d228">Direction</a> { <a class="el" href="classAccelStepper.html#a7468f91a925c689c3ba250f8d074d228a6959a4549f734bd771d418f995ba4fb4">DIRECTION_CCW</a> = 0,
<a class="el" href="classAccelStepper.html#a7468f91a925c689c3ba250f8d074d228ad604e0047f7cb47662c5a1cf6999337c">DIRECTION_CW</a> = 1
}<tr class="memdesc:a7468f91a925c689c3ba250f8d074d228"><td class="mdescLeft">&#160;</td><td class="mdescRight">Direction indicator Symbolic names for the direction the motor is turning. <a href="classAccelStepper.html#a7468f91a925c689c3ba250f8d074d228">More...</a><br /></td></tr>
</td></tr>
<tr class="memitem:a7468f91a925c689c3ba250f8d074d228"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAccelStepper.html#a7468f91a925c689c3ba250f8d074d228">Direction</a> { <a class="el" href="classAccelStepper.html#a7468f91a925c689c3ba250f8d074d228a6959a4549f734bd771d418f995ba4fb4">DIRECTION_CCW</a> = 0
, <a class="el" href="classAccelStepper.html#a7468f91a925c689c3ba250f8d074d228ad604e0047f7cb47662c5a1cf6999337c">DIRECTION_CW</a> = 1
}</td></tr>
<tr class="memdesc:a7468f91a925c689c3ba250f8d074d228"><td class="mdescLeft">&#160;</td><td class="mdescRight">Direction indicator Symbolic names for the direction the motor is turning. <a href="classAccelStepper.html#a7468f91a925c689c3ba250f8d074d228">More...</a><br /></td></tr>
<tr class="separator:a7468f91a925c689c3ba250f8d074d228"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:affbee789b5c19165846cf0409860ae79"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAccelStepper.html#affbee789b5c19165846cf0409860ae79">computeNewSpeed</a> ()</td></tr>
<tr class="separator:affbee789b5c19165846cf0409860ae79"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aab5944f43f869675958939c421bd9a01"><td class="memItemLeft" align="right" valign="top">virtual unsigned long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAccelStepper.html#aab5944f43f869675958939c421bd9a01">computeNewSpeed</a> ()</td></tr>
<tr class="separator:aab5944f43f869675958939c421bd9a01"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af3c2516b6ce7c1ecbc2004107bb2a9ce"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAccelStepper.html#af3c2516b6ce7c1ecbc2004107bb2a9ce">setOutputPins</a> (uint8_t mask)</td></tr>
<tr class="separator:af3c2516b6ce7c1ecbc2004107bb2a9ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a419121702399d8ac66df4cc47481f4"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAccelStepper.html#a8a419121702399d8ac66df4cc47481f4">step</a> (long step)</td></tr>
<tr class="separator:a8a419121702399d8ac66df4cc47481f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af4908b53e1821f0a6d2dab509257b3e6"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAccelStepper.html#af4908b53e1821f0a6d2dab509257b3e6">stepForward</a> ()</td></tr>
<tr class="separator:af4908b53e1821f0a6d2dab509257b3e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af8abc9ede47286fa33b518e0bf297c6a"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAccelStepper.html#af8abc9ede47286fa33b518e0bf297c6a">stepBackward</a> ()</td></tr>
<tr class="separator:af8abc9ede47286fa33b518e0bf297c6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa2913db789e6fa05756579ff82fe6e7e"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAccelStepper.html#aa2913db789e6fa05756579ff82fe6e7e">step0</a> (long <a class="el" href="classAccelStepper.html#a8a419121702399d8ac66df4cc47481f4">step</a>)</td></tr>
<tr class="separator:aa2913db789e6fa05756579ff82fe6e7e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a63ef416bc039da539294e84a41e7d7dc"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAccelStepper.html#a63ef416bc039da539294e84a41e7d7dc">step1</a> (long <a class="el" href="classAccelStepper.html#a8a419121702399d8ac66df4cc47481f4">step</a>)</td></tr>
@ -165,17 +171,21 @@ Protected Member Functions</h2></td></tr>
Protected Attributes</h2></td></tr>
<tr class="memitem:a35162cdf8ed9a98f98984c177d5ade58"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAccelStepper.html#a35162cdf8ed9a98f98984c177d5ade58">_direction</a></td></tr>
<tr class="separator:a35162cdf8ed9a98f98984c177d5ade58"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a744fa74c2e181e75509a34b17c02e984"><td class="memItemLeft" align="right" valign="top">unsigned long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classAccelStepper.html#a744fa74c2e181e75509a34b17c02e984">_stepInterval</a></td></tr>
<tr class="separator:a744fa74c2e181e75509a34b17c02e984"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Support for stepper motors with acceleration etc. </p>
<p>This defines a single 2 or 4 pin stepper motor, or stepper moter with fdriver chip, with optional acceleration, deceleration, absolute positioning commands etc. Multiple simultaneous steppers are supported, all moving at different speeds and accelerations.</p>
<dl class="section user"><dt>Operation</dt><dd>This module operates by computing a step time in microseconds. The step time is recomputed after each step and after speed and acceleration parameters are changed by the caller. The time of each step is recorded in microseconds. The <a class="el" href="classAccelStepper.html#a608b2395b64ac15451d16d0371fe13ce">run()</a> function steps the motor once if a new step is due. The <a class="el" href="classAccelStepper.html#a608b2395b64ac15451d16d0371fe13ce">run()</a> function must be called frequently until the motor is in the desired position, after which time <a class="el" href="classAccelStepper.html#a608b2395b64ac15451d16d0371fe13ce">run()</a> will do nothing.</dd></dl>
<dl class="section user"><dt>Positioning</dt><dd>Positions are specified by a signed long integer. At construction time, the current position of the motor is consider to be 0. Positive positions are clockwise from the initial position; negative positions are anticlockwise. The current position can be altered for instance after initialization positioning.</dd></dl>
<dl class="section user"><dt>Caveats</dt><dd>This is an open loop controller: If the motor stalls or is oversped, <a class="el" href="classAccelStepper.html" title="Support for stepper motors with acceleration etc. ">AccelStepper</a> will not have a correct idea of where the motor really is (since there is no feedback of the motor's real position. We only know where we <em>think</em> it is, relative to the initial starting point).</dd></dl>
<dl class="section user"><dt>Caveats</dt><dd>This is an open loop controller: If the motor stalls or is oversped, <a class="el" href="classAccelStepper.html" title="Support for stepper motors with acceleration etc.">AccelStepper</a> will not have a correct idea of where the motor really is (since there is no feedback of the motor's real position. We only know where we <em>think</em> it is, relative to the initial starting point).</dd></dl>
<dl class="section user"><dt>Performance</dt><dd>The fastest motor speed that can be reliably supported is about 4000 steps per second at a clock frequency of 16 MHz on Arduino such as Uno etc. Faster processors can support faster stepping speeds. However, any speed less than that down to very slow speeds (much less than one per second) are also supported, provided the <a class="el" href="classAccelStepper.html#a608b2395b64ac15451d16d0371fe13ce">run()</a> function is called frequently enough to step the motor whenever required for the speed set. Calling <a class="el" href="classAccelStepper.html#adfb19e3cd2a028a1fe78131787604fd1">setAcceleration()</a> is expensive, since it requires a square root to be calculated.</dd></dl>
<p>Gregor Christandl reports that with an Arduino Due and a simple test program, he measured 43163 steps per second using <a class="el" href="classAccelStepper.html#aa4a6bdf99f698284faaeb5542b0b7514">runSpeed()</a>, and 16214 steps per second using <a class="el" href="classAccelStepper.html#a608b2395b64ac15451d16d0371fe13ce">run()</a>; </p>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a class="anchor" id="a7468f91a925c689c3ba250f8d074d228"></a>
<a id="a7468f91a925c689c3ba250f8d074d228"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7468f91a925c689c3ba250f8d074d228">&#9670;&nbsp;</a></span>Direction</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
@ -195,17 +205,17 @@ Protected Attributes</h2></td></tr>
<p>Direction indicator Symbolic names for the direction the motor is turning. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="a7468f91a925c689c3ba250f8d074d228a6959a4549f734bd771d418f995ba4fb4"></a>DIRECTION_CCW&#160;</td><td class="fielddoc">
<p>Counter-Clockwise. </p>
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a7468f91a925c689c3ba250f8d074d228a6959a4549f734bd771d418f995ba4fb4"></a>DIRECTION_CCW&#160;</td><td class="fielddoc"><p>Counter-Clockwise. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a7468f91a925c689c3ba250f8d074d228ad604e0047f7cb47662c5a1cf6999337c"></a>DIRECTION_CW&#160;</td><td class="fielddoc">
<p>Clockwise. </p>
<tr><td class="fieldname"><a id="a7468f91a925c689c3ba250f8d074d228ad604e0047f7cb47662c5a1cf6999337c"></a>DIRECTION_CW&#160;</td><td class="fielddoc"><p>Clockwise. </p>
</td></tr>
</table>
</div>
</div>
<a class="anchor" id="a73bdecf1273d98d8c5fbcb764cabeea5"></a>
<a id="a73bdecf1273d98d8c5fbcb764cabeea5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a73bdecf1273d98d8c5fbcb764cabeea5">&#9670;&nbsp;</a></span>MotorInterfaceType</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
@ -215,35 +225,30 @@ Protected Attributes</h2></td></tr>
</table>
</div><div class="memdoc">
<p>Symbolic names for number of pins. Use this in the pins argument the <a class="el" href="classAccelStepper.html" title="Support for stepper motors with acceleration etc. ">AccelStepper</a> constructor to provide a symbolic name for the number of pins to use. </p>
<p>Symbolic names for number of pins. Use this in the pins argument the <a class="el" href="classAccelStepper.html" title="Support for stepper motors with acceleration etc.">AccelStepper</a> constructor to provide a symbolic name for the number of pins to use. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="a73bdecf1273d98d8c5fbcb764cabeea5af5bb99ad9d67ad2d85f840e3abcfe068"></a>FUNCTION&#160;</td><td class="fielddoc">
<p>Use the functional interface, implementing your own driver functions (internal use only) </p>
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a73bdecf1273d98d8c5fbcb764cabeea5af5bb99ad9d67ad2d85f840e3abcfe068"></a>FUNCTION&#160;</td><td class="fielddoc"><p>Use the functional interface, implementing your own driver functions (internal use only) </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a73bdecf1273d98d8c5fbcb764cabeea5ac3523e4cf6763ba518d16fec3708ef23"></a>DRIVER&#160;</td><td class="fielddoc">
<p>Stepper Driver, 2 driver pins required. </p>
<tr><td class="fieldname"><a id="a73bdecf1273d98d8c5fbcb764cabeea5ac3523e4cf6763ba518d16fec3708ef23"></a>DRIVER&#160;</td><td class="fielddoc"><p>Stepper Driver, 2 driver pins required. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a73bdecf1273d98d8c5fbcb764cabeea5a62a305b52f749ff8c89138273fbb012d"></a>FULL2WIRE&#160;</td><td class="fielddoc">
<p>2 wire stepper, 2 motor pins required </p>
<tr><td class="fieldname"><a id="a73bdecf1273d98d8c5fbcb764cabeea5a62a305b52f749ff8c89138273fbb012d"></a>FULL2WIRE&#160;</td><td class="fielddoc"><p>2 wire stepper, 2 motor pins required </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a73bdecf1273d98d8c5fbcb764cabeea5a0b8eea5cf0f8ce70b1959d2977ccc996"></a>FULL3WIRE&#160;</td><td class="fielddoc">
<p>3 wire stepper, such as HDD spindle, 3 motor pins required </p>
<tr><td class="fieldname"><a id="a73bdecf1273d98d8c5fbcb764cabeea5a0b8eea5cf0f8ce70b1959d2977ccc996"></a>FULL3WIRE&#160;</td><td class="fielddoc"><p>3 wire stepper, such as HDD spindle, 3 motor pins required </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a73bdecf1273d98d8c5fbcb764cabeea5adedd394a375190a3df8d4519c0d4dc2f"></a>FULL4WIRE&#160;</td><td class="fielddoc">
<p>4 wire full stepper, 4 motor pins required </p>
<tr><td class="fieldname"><a id="a73bdecf1273d98d8c5fbcb764cabeea5adedd394a375190a3df8d4519c0d4dc2f"></a>FULL4WIRE&#160;</td><td class="fielddoc"><p>4 wire full stepper, 4 motor pins required </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a73bdecf1273d98d8c5fbcb764cabeea5a00c2387a5af43d8e97639699ab7a5c7f"></a>HALF3WIRE&#160;</td><td class="fielddoc">
<p>3 wire half stepper, such as HDD spindle, 3 motor pins required </p>
<tr><td class="fieldname"><a id="a73bdecf1273d98d8c5fbcb764cabeea5a00c2387a5af43d8e97639699ab7a5c7f"></a>HALF3WIRE&#160;</td><td class="fielddoc"><p>3 wire half stepper, such as HDD spindle, 3 motor pins required </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="a73bdecf1273d98d8c5fbcb764cabeea5aecc0900c55b777d2e885581b8c434b07"></a>HALF4WIRE&#160;</td><td class="fielddoc">
<p>4 wire half stepper, 4 motor pins required </p>
<tr><td class="fieldname"><a id="a73bdecf1273d98d8c5fbcb764cabeea5aecc0900c55b777d2e885581b8c434b07"></a>HALF4WIRE&#160;</td><td class="fielddoc"><p>4 wire half stepper, 4 motor pins required </p>
</td></tr>
</table>
</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a3bc75bd6571b98a6177838ca81ac39ab"></a>
<a id="a3bc75bd6571b98a6177838ca81ac39ab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3bc75bd6571b98a6177838ca81ac39ab">&#9670;&nbsp;</a></span>AccelStepper() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
@ -292,9 +297,9 @@ Protected Attributes</h2></td></tr>
</div><div class="memdoc">
<p>Constructor. You can have multiple simultaneous steppers, all moving at different speeds and accelerations, provided you call their <a class="el" href="classAccelStepper.html#a608b2395b64ac15451d16d0371fe13ce">run()</a> functions at frequent enough intervals. Current Position is set to 0, target position is set to 0. MaxSpeed and Acceleration default to 1.0. The motor pins will be initialised to OUTPUT mode during the constructor by a call to <a class="el" href="classAccelStepper.html#aa279a50d30d0413f570c692cff071643">enableOutputs()</a>. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">interface</td><td>Number of pins to interface to. Integer values are supported, but it is preferred to use the <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5">MotorInterfaceType</a> symbolic names. <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5ac3523e4cf6763ba518d16fec3708ef23" title="Stepper Driver, 2 driver pins required. ">AccelStepper::DRIVER</a> (1) means a stepper driver (with Step and Direction pins). If an enable line is also needed, call <a class="el" href="classAccelStepper.html#a56a81c5f00d02ca19646718e88e974c0">setEnablePin()</a> after construction. You may also invert the pins using <a class="el" href="classAccelStepper.html#ac62cae590c2f9c303519a3a1c4adc8ab">setPinsInverted()</a>. <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5a62a305b52f749ff8c89138273fbb012d" title="2 wire stepper, 2 motor pins required ">AccelStepper::FULL2WIRE</a> (2) means a 2 wire stepper (2 pins required). <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5a0b8eea5cf0f8ce70b1959d2977ccc996" title="3 wire stepper, such as HDD spindle, 3 motor pins required ">AccelStepper::FULL3WIRE</a> (3) means a 3 wire stepper, such as HDD spindle (3 pins required). <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5adedd394a375190a3df8d4519c0d4dc2f" title="4 wire full stepper, 4 motor pins required ">AccelStepper::FULL4WIRE</a> (4) means a 4 wire stepper (4 pins required). <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5a00c2387a5af43d8e97639699ab7a5c7f" title="3 wire half stepper, such as HDD spindle, 3 motor pins required ">AccelStepper::HALF3WIRE</a> (6) means a 3 wire half stepper, such as HDD spindle (3 pins required) <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5aecc0900c55b777d2e885581b8c434b07" title="4 wire half stepper, 4 motor pins required ">AccelStepper::HALF4WIRE</a> (8) means a 4 wire half stepper (4 pins required) Defaults to <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5adedd394a375190a3df8d4519c0d4dc2f" title="4 wire full stepper, 4 motor pins required ">AccelStepper::FULL4WIRE</a> (4) pins. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">pin1</td><td>Arduino digital pin number for motor pin 1. Defaults to pin 2. For a <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5ac3523e4cf6763ba518d16fec3708ef23" title="Stepper Driver, 2 driver pins required. ">AccelStepper::DRIVER</a> (interface==1), this is the Step input to the driver. Low to high transition means to step) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">pin2</td><td>Arduino digital pin number for motor pin 2. Defaults to pin 3. For a <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5ac3523e4cf6763ba518d16fec3708ef23" title="Stepper Driver, 2 driver pins required. ">AccelStepper::DRIVER</a> (interface==1), this is the Direction input the driver. High means forward. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">interface</td><td>Number of pins to interface to. Integer values are supported, but it is preferred to use the <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5">MotorInterfaceType</a> symbolic names. <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5ac3523e4cf6763ba518d16fec3708ef23" title="Stepper Driver, 2 driver pins required.">AccelStepper::DRIVER</a> (1) means a stepper driver (with Step and Direction pins). If an enable line is also needed, call <a class="el" href="classAccelStepper.html#a56a81c5f00d02ca19646718e88e974c0">setEnablePin()</a> after construction. You may also invert the pins using <a class="el" href="classAccelStepper.html#ac62cae590c2f9c303519a3a1c4adc8ab">setPinsInverted()</a>. Caution: DRIVER implements a blocking delay of minPulseWidth microseconds (default 1us) for each step. You can change this with <a class="el" href="classAccelStepper.html#af4d3818e691dad5dc518308796ccf154">setMinPulseWidth()</a>. <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5a62a305b52f749ff8c89138273fbb012d" title="2 wire stepper, 2 motor pins required">AccelStepper::FULL2WIRE</a> (2) means a 2 wire stepper (2 pins required). <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5a0b8eea5cf0f8ce70b1959d2977ccc996" title="3 wire stepper, such as HDD spindle, 3 motor pins required">AccelStepper::FULL3WIRE</a> (3) means a 3 wire stepper, such as HDD spindle (3 pins required). <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5adedd394a375190a3df8d4519c0d4dc2f" title="4 wire full stepper, 4 motor pins required">AccelStepper::FULL4WIRE</a> (4) means a 4 wire stepper (4 pins required). <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5a00c2387a5af43d8e97639699ab7a5c7f" title="3 wire half stepper, such as HDD spindle, 3 motor pins required">AccelStepper::HALF3WIRE</a> (6) means a 3 wire half stepper, such as HDD spindle (3 pins required) <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5aecc0900c55b777d2e885581b8c434b07" title="4 wire half stepper, 4 motor pins required">AccelStepper::HALF4WIRE</a> (8) means a 4 wire half stepper (4 pins required) Defaults to <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5adedd394a375190a3df8d4519c0d4dc2f" title="4 wire full stepper, 4 motor pins required">AccelStepper::FULL4WIRE</a> (4) pins. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">pin1</td><td>Arduino digital pin number for motor pin 1. Defaults to pin 2. For a <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5ac3523e4cf6763ba518d16fec3708ef23" title="Stepper Driver, 2 driver pins required.">AccelStepper::DRIVER</a> (interface==1), this is the Step input to the driver. Low to high transition means to step) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">pin2</td><td>Arduino digital pin number for motor pin 2. Defaults to pin 3. For a <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5ac3523e4cf6763ba518d16fec3708ef23" title="Stepper Driver, 2 driver pins required.">AccelStepper::DRIVER</a> (interface==1), this is the Direction input the driver. High means forward. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">pin3</td><td>Arduino digital pin number for motor pin 3. Defaults to pin 4. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">pin4</td><td>Arduino digital pin number for motor pin 4. Defaults to pin 5. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">enable</td><td>If this is true (the default), <a class="el" href="classAccelStepper.html#aa279a50d30d0413f570c692cff071643">enableOutputs()</a> will be called to enable the output pins at construction time. </td></tr>
@ -302,11 +307,13 @@ Protected Attributes</h2></td></tr>
</dd>
</dl>
<p>References <a class="el" href="classAccelStepper.html#a35162cdf8ed9a98f98984c177d5ade58">_direction</a>, <a class="el" href="classAccelStepper.html#a7468f91a925c689c3ba250f8d074d228a6959a4549f734bd771d418f995ba4fb4">DIRECTION_CCW</a>, <a class="el" href="classAccelStepper.html#aa279a50d30d0413f570c692cff071643">enableOutputs()</a>, and <a class="el" href="classAccelStepper.html#adfb19e3cd2a028a1fe78131787604fd1">setAcceleration()</a>.</p>
<p class="reference">References <a class="el" href="classAccelStepper.html#a35162cdf8ed9a98f98984c177d5ade58">_direction</a>, <a class="el" href="classAccelStepper.html#a744fa74c2e181e75509a34b17c02e984">_stepInterval</a>, <a class="el" href="classAccelStepper.html#a7468f91a925c689c3ba250f8d074d228a6959a4549f734bd771d418f995ba4fb4">DIRECTION_CCW</a>, <a class="el" href="classAccelStepper.html#aa279a50d30d0413f570c692cff071643">enableOutputs()</a>, <a class="el" href="classAccelStepper.html#adfb19e3cd2a028a1fe78131787604fd1">setAcceleration()</a>, and <a class="el" href="classAccelStepper.html#abee8d466229b87accba33d6ec929c18f">setMaxSpeed()</a>.</p>
</div>
</div>
<a class="anchor" id="afa3061ce813303a8f2fa206ee8d012bd"></a>
<a id="afa3061ce813303a8f2fa206ee8d012bd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afa3061ce813303a8f2fa206ee8d012bd">&#9670;&nbsp;</a></span>AccelStepper() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
@ -337,12 +344,34 @@ Protected Attributes</h2></td></tr>
</dd>
</dl>
<p>References <a class="el" href="classAccelStepper.html#a35162cdf8ed9a98f98984c177d5ade58">_direction</a>, <a class="el" href="classAccelStepper.html#a7468f91a925c689c3ba250f8d074d228a6959a4549f734bd771d418f995ba4fb4">DIRECTION_CCW</a>, and <a class="el" href="classAccelStepper.html#adfb19e3cd2a028a1fe78131787604fd1">setAcceleration()</a>.</p>
<p class="reference">References <a class="el" href="classAccelStepper.html#a35162cdf8ed9a98f98984c177d5ade58">_direction</a>, <a class="el" href="classAccelStepper.html#a744fa74c2e181e75509a34b17c02e984">_stepInterval</a>, <a class="el" href="classAccelStepper.html#a7468f91a925c689c3ba250f8d074d228a6959a4549f734bd771d418f995ba4fb4">DIRECTION_CCW</a>, <a class="el" href="classAccelStepper.html#adfb19e3cd2a028a1fe78131787604fd1">setAcceleration()</a>, and <a class="el" href="classAccelStepper.html#abee8d466229b87accba33d6ec929c18f">setMaxSpeed()</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="affbee789b5c19165846cf0409860ae79"></a>
<a id="a8b76f1ae6a49d2c2887b9fea30b8d84f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8b76f1ae6a49d2c2887b9fea30b8d84f">&#9670;&nbsp;</a></span>acceleration()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">float AccelStepper::acceleration </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the acceleration/deceleration rate configured for this stepper that was previously set by <a class="el" href="classAccelStepper.html#adfb19e3cd2a028a1fe78131787604fd1">setAcceleration()</a>; </p><dl class="section return"><dt>Returns</dt><dd>The currently configured acceleration/deceleration </dd></dl>
<p class="reference">Referenced by <a class="el" href="classAccelStepper.html#adfb19e3cd2a028a1fe78131787604fd1">setAcceleration()</a>.</p>
</div>
</div>
<a id="aab5944f43f869675958939c421bd9a01"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aab5944f43f869675958939c421bd9a01">&#9670;&nbsp;</a></span>computeNewSpeed()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
@ -350,7 +379,7 @@ Protected Attributes</h2></td></tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void AccelStepper::computeNewSpeed </td>
<td class="memname">unsigned long AccelStepper::computeNewSpeed </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
@ -358,7 +387,7 @@ Protected Attributes</h2></td></tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
@ -366,16 +395,19 @@ Protected Attributes</h2></td></tr>
<li>after each step </li>
<li>after change to maxSpeed through <a class="el" href="classAccelStepper.html#abee8d466229b87accba33d6ec929c18f">setMaxSpeed()</a> </li>
<li>after change to acceleration through <a class="el" href="classAccelStepper.html#adfb19e3cd2a028a1fe78131787604fd1">setAcceleration()</a> </li>
<li>after change to target position (relative or absolute) through <a class="el" href="classAccelStepper.html#a68942c66e78fb7f7b5f0cdade6eb7f06">move()</a> or <a class="el" href="classAccelStepper.html#ace236ede35f87c63d18da25810ec9736">moveTo()</a> </li>
<li>after change to target position (relative or absolute) through <a class="el" href="classAccelStepper.html#a68942c66e78fb7f7b5f0cdade6eb7f06">move()</a> or <a class="el" href="classAccelStepper.html#ace236ede35f87c63d18da25810ec9736">moveTo()</a> <dl class="section return"><dt>Returns</dt><dd>the new step interval </dd></dl>
</li>
</ul>
<p>References <a class="el" href="classAccelStepper.html#a35162cdf8ed9a98f98984c177d5ade58">_direction</a>, <a class="el" href="classAccelStepper.html#a7468f91a925c689c3ba250f8d074d228a6959a4549f734bd771d418f995ba4fb4">DIRECTION_CCW</a>, <a class="el" href="classAccelStepper.html#a7468f91a925c689c3ba250f8d074d228ad604e0047f7cb47662c5a1cf6999337c">DIRECTION_CW</a>, and <a class="el" href="classAccelStepper.html#a748665c3962e66fbc0e9373eb14c69c1">distanceToGo()</a>.</p>
<p class="reference">References <a class="el" href="classAccelStepper.html#a35162cdf8ed9a98f98984c177d5ade58">_direction</a>, <a class="el" href="classAccelStepper.html#a744fa74c2e181e75509a34b17c02e984">_stepInterval</a>, <a class="el" href="classAccelStepper.html#a7468f91a925c689c3ba250f8d074d228a6959a4549f734bd771d418f995ba4fb4">DIRECTION_CCW</a>, <a class="el" href="classAccelStepper.html#a7468f91a925c689c3ba250f8d074d228ad604e0047f7cb47662c5a1cf6999337c">DIRECTION_CW</a>, and <a class="el" href="classAccelStepper.html#a748665c3962e66fbc0e9373eb14c69c1">distanceToGo()</a>.</p>
<p>Referenced by <a class="el" href="classAccelStepper.html#ace236ede35f87c63d18da25810ec9736">moveTo()</a>, <a class="el" href="classAccelStepper.html#a608b2395b64ac15451d16d0371fe13ce">run()</a>, <a class="el" href="classAccelStepper.html#adfb19e3cd2a028a1fe78131787604fd1">setAcceleration()</a>, and <a class="el" href="classAccelStepper.html#abee8d466229b87accba33d6ec929c18f">setMaxSpeed()</a>.</p>
<p class="reference">Referenced by <a class="el" href="classAccelStepper.html#ace236ede35f87c63d18da25810ec9736">moveTo()</a>, <a class="el" href="classAccelStepper.html#a608b2395b64ac15451d16d0371fe13ce">run()</a>, <a class="el" href="classAccelStepper.html#adfb19e3cd2a028a1fe78131787604fd1">setAcceleration()</a>, and <a class="el" href="classAccelStepper.html#abee8d466229b87accba33d6ec929c18f">setMaxSpeed()</a>.</p>
</div>
</div>
<a class="anchor" id="a5dce13ab2a1b02b8f443318886bf6fc5"></a>
<a id="a5dce13ab2a1b02b8f443318886bf6fc5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5dce13ab2a1b02b8f443318886bf6fc5">&#9670;&nbsp;</a></span>currentPosition()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
@ -387,13 +419,15 @@ Protected Attributes</h2></td></tr>
</tr>
</table>
</div><div class="memdoc">
<p>The currently motor position. </p><dl class="section return"><dt>Returns</dt><dd>the current motor position in steps. Positive is clockwise from the 0 position. </dd></dl>
<p>The current motor position. </p><dl class="section return"><dt>Returns</dt><dd>the current motor position in steps. Positive is clockwise from the 0 position. </dd></dl>
<p>Referenced by <a class="el" href="classMultiStepper.html#a291fec32a79390b6eb00296cffac49ee">MultiStepper::moveTo()</a>.</p>
<p class="reference">Referenced by <a class="el" href="classMultiStepper.html#a291fec32a79390b6eb00296cffac49ee">MultiStepper::moveTo()</a>.</p>
</div>
</div>
<a class="anchor" id="a3591e29a236e2935afd7f64ff6c22006"></a>
<a id="a3591e29a236e2935afd7f64ff6c22006"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3591e29a236e2935afd7f64ff6c22006">&#9670;&nbsp;</a></span>disableOutputs()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
@ -415,11 +449,13 @@ Protected Attributes</h2></td></tr>
</div><div class="memdoc">
<p>Disable motor pin outputs by setting them all LOW Depending on the design of your electronics this may turn off the power to the motor coils, saving power. This is useful to support Arduino low power modes: disable the outputs during sleep and then reenable with <a class="el" href="classAccelStepper.html#aa279a50d30d0413f570c692cff071643">enableOutputs()</a> before stepping again. If the enable Pin is defined, sets it to OUTPUT mode and clears the pin to disabled. </p>
<p>References <a class="el" href="classAccelStepper.html#af3c2516b6ce7c1ecbc2004107bb2a9ce">setOutputPins()</a>.</p>
<p class="reference">References <a class="el" href="classAccelStepper.html#af3c2516b6ce7c1ecbc2004107bb2a9ce">setOutputPins()</a>.</p>
</div>
</div>
<a class="anchor" id="a748665c3962e66fbc0e9373eb14c69c1"></a>
<a id="a748665c3962e66fbc0e9373eb14c69c1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a748665c3962e66fbc0e9373eb14c69c1">&#9670;&nbsp;</a></span>distanceToGo()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
@ -433,11 +469,13 @@ Protected Attributes</h2></td></tr>
</div><div class="memdoc">
<p>The distance from the current position to the target position. </p><dl class="section return"><dt>Returns</dt><dd>the distance from the current position to the target position in steps. Positive is clockwise from the current position. </dd></dl>
<p>Referenced by <a class="el" href="classAccelStepper.html#affbee789b5c19165846cf0409860ae79">computeNewSpeed()</a>, and <a class="el" href="classAccelStepper.html#a608b2395b64ac15451d16d0371fe13ce">run()</a>.</p>
<p class="reference">Referenced by <a class="el" href="classAccelStepper.html#aab5944f43f869675958939c421bd9a01">computeNewSpeed()</a>, and <a class="el" href="classAccelStepper.html#a608b2395b64ac15451d16d0371fe13ce">run()</a>.</p>
</div>
</div>
<a class="anchor" id="aa279a50d30d0413f570c692cff071643"></a>
<a id="aa279a50d30d0413f570c692cff071643"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa279a50d30d0413f570c692cff071643">&#9670;&nbsp;</a></span>enableOutputs()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
@ -459,13 +497,15 @@ Protected Attributes</h2></td></tr>
</div><div class="memdoc">
<p>Enable motor pin outputs by setting the motor pins to OUTPUT mode. Called automatically by the constructor. If the enable Pin is defined, sets it to OUTPUT mode and sets the pin to enabled. </p>
<p>References <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5a0b8eea5cf0f8ce70b1959d2977ccc996">FULL3WIRE</a>, <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5adedd394a375190a3df8d4519c0d4dc2f">FULL4WIRE</a>, <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5a00c2387a5af43d8e97639699ab7a5c7f">HALF3WIRE</a>, and <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5aecc0900c55b777d2e885581b8c434b07">HALF4WIRE</a>.</p>
<p class="reference">References <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5a0b8eea5cf0f8ce70b1959d2977ccc996">FULL3WIRE</a>, <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5adedd394a375190a3df8d4519c0d4dc2f">FULL4WIRE</a>, <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5a00c2387a5af43d8e97639699ab7a5c7f">HALF3WIRE</a>, and <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5aecc0900c55b777d2e885581b8c434b07">HALF4WIRE</a>.</p>
<p>Referenced by <a class="el" href="classAccelStepper.html#a3bc75bd6571b98a6177838ca81ac39ab">AccelStepper()</a>.</p>
<p class="reference">Referenced by <a class="el" href="classAccelStepper.html#a3bc75bd6571b98a6177838ca81ac39ab">AccelStepper()</a>.</p>
</div>
</div>
<a class="anchor" id="a3a60cc0b962f8ceb81ee1e6f36443ceb"></a>
<a id="a3a60cc0b962f8ceb81ee1e6f36443ceb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3a60cc0b962f8ceb81ee1e6f36443ceb">&#9670;&nbsp;</a></span>isRunning()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
@ -481,7 +521,9 @@ Protected Attributes</h2></td></tr>
</div>
</div>
<a class="anchor" id="a6123a1dfb4495d8bd2646288eae60d7f"></a>
<a id="a6123a1dfb4495d8bd2646288eae60d7f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6123a1dfb4495d8bd2646288eae60d7f">&#9670;&nbsp;</a></span>maxSpeed()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
@ -493,13 +535,15 @@ Protected Attributes</h2></td></tr>
</tr>
</table>
</div><div class="memdoc">
<p>returns the maximum speed configured for this stepper that was previously set by <a class="el" href="classAccelStepper.html#abee8d466229b87accba33d6ec929c18f">setMaxSpeed()</a>; </p><dl class="section return"><dt>Returns</dt><dd>The currently configured maximum speed </dd></dl>
<p>Returns the maximum speed configured for this stepper that was previously set by <a class="el" href="classAccelStepper.html#abee8d466229b87accba33d6ec929c18f">setMaxSpeed()</a>; </p><dl class="section return"><dt>Returns</dt><dd>The currently configured maximum speed </dd></dl>
<p>Referenced by <a class="el" href="classMultiStepper.html#a291fec32a79390b6eb00296cffac49ee">MultiStepper::moveTo()</a>.</p>
<p class="reference">Referenced by <a class="el" href="classMultiStepper.html#a291fec32a79390b6eb00296cffac49ee">MultiStepper::moveTo()</a>.</p>
</div>
</div>
<a class="anchor" id="a68942c66e78fb7f7b5f0cdade6eb7f06"></a>
<a id="a68942c66e78fb7f7b5f0cdade6eb7f06"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a68942c66e78fb7f7b5f0cdade6eb7f06">&#9670;&nbsp;</a></span>move()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
@ -512,20 +556,22 @@ Protected Attributes</h2></td></tr>
</tr>
</table>
</div><div class="memdoc">
<p>Set the target position relative to the current position </p><dl class="params"><dt>Parameters</dt><dd>
<p>Set the target position relative to the current position. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">relative</td><td>The desired position relative to the current position. Negative is anticlockwise from the current position. </td></tr>
</table>
</dd>
</dl>
<p>References <a class="el" href="classAccelStepper.html#ace236ede35f87c63d18da25810ec9736">moveTo()</a>.</p>
<p class="reference">References <a class="el" href="classAccelStepper.html#ace236ede35f87c63d18da25810ec9736">moveTo()</a>.</p>
<p>Referenced by <a class="el" href="classAccelStepper.html#a638817b85aed9d5cd15c76a76c00aced">stop()</a>.</p>
<p class="reference">Referenced by <a class="el" href="classAccelStepper.html#a638817b85aed9d5cd15c76a76c00aced">stop()</a>.</p>
</div>
</div>
<a class="anchor" id="ace236ede35f87c63d18da25810ec9736"></a>
<a id="ace236ede35f87c63d18da25810ec9736"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ace236ede35f87c63d18da25810ec9736">&#9670;&nbsp;</a></span>moveTo()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
@ -545,13 +591,15 @@ Protected Attributes</h2></td></tr>
</dd>
</dl>
<p>References <a class="el" href="classAccelStepper.html#affbee789b5c19165846cf0409860ae79">computeNewSpeed()</a>.</p>
<p class="reference">References <a class="el" href="classAccelStepper.html#aab5944f43f869675958939c421bd9a01">computeNewSpeed()</a>.</p>
<p>Referenced by <a class="el" href="classAccelStepper.html#a68942c66e78fb7f7b5f0cdade6eb7f06">move()</a>, <a class="el" href="classMultiStepper.html#a291fec32a79390b6eb00296cffac49ee">MultiStepper::moveTo()</a>, and <a class="el" href="classAccelStepper.html#a176c5d2e4c2f21e9e92b12e39a6f0e67">runToNewPosition()</a>.</p>
<p class="reference">Referenced by <a class="el" href="classAccelStepper.html#a68942c66e78fb7f7b5f0cdade6eb7f06">move()</a>, <a class="el" href="classMultiStepper.html#a291fec32a79390b6eb00296cffac49ee">MultiStepper::moveTo()</a>, and <a class="el" href="classAccelStepper.html#a176c5d2e4c2f21e9e92b12e39a6f0e67">runToNewPosition()</a>.</p>
</div>
</div>
<a class="anchor" id="a608b2395b64ac15451d16d0371fe13ce"></a>
<a id="a608b2395b64ac15451d16d0371fe13ce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a608b2395b64ac15451d16d0371fe13ce">&#9670;&nbsp;</a></span>run()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
@ -563,15 +611,17 @@ Protected Attributes</h2></td></tr>
</tr>
</table>
</div><div class="memdoc">
<p>Poll the motor and step it if a step is due, implementing accelerations and decelerations to acheive the target position. You must call this as frequently as possible, but at least once per minimum step time interval, preferably in your main loop. Note that each call to <a class="el" href="classAccelStepper.html#a608b2395b64ac15451d16d0371fe13ce">run()</a> will make at most one step, and then only when a step is due, based on the current speed and the time since the last step. </p><dl class="section return"><dt>Returns</dt><dd>true if the motor is still running to the target position. </dd></dl>
<p>Poll the motor and step it if a step is due, implementing accelerations and decelerations to achieve the target position. You must call this as frequently as possible, but at least once per minimum step time interval, preferably in your main loop. Note that each call to <a class="el" href="classAccelStepper.html#a608b2395b64ac15451d16d0371fe13ce">run()</a> will make at most one step, and then only when a step is due, based on the current speed and the time since the last step. </p><dl class="section return"><dt>Returns</dt><dd>true if the motor is still running to the target position. </dd></dl>
<p>References <a class="el" href="classAccelStepper.html#affbee789b5c19165846cf0409860ae79">computeNewSpeed()</a>, <a class="el" href="classAccelStepper.html#a748665c3962e66fbc0e9373eb14c69c1">distanceToGo()</a>, and <a class="el" href="classAccelStepper.html#aa4a6bdf99f698284faaeb5542b0b7514">runSpeed()</a>.</p>
<p class="reference">References <a class="el" href="classAccelStepper.html#aab5944f43f869675958939c421bd9a01">computeNewSpeed()</a>, <a class="el" href="classAccelStepper.html#a748665c3962e66fbc0e9373eb14c69c1">distanceToGo()</a>, and <a class="el" href="classAccelStepper.html#aa4a6bdf99f698284faaeb5542b0b7514">runSpeed()</a>.</p>
<p>Referenced by <a class="el" href="classAccelStepper.html#a344f58fef8cc34ac5aa75ba4b665d21c">runToPosition()</a>.</p>
<p class="reference">Referenced by <a class="el" href="classAccelStepper.html#a344f58fef8cc34ac5aa75ba4b665d21c">runToPosition()</a>.</p>
</div>
</div>
<a class="anchor" id="aa4a6bdf99f698284faaeb5542b0b7514"></a>
<a id="aa4a6bdf99f698284faaeb5542b0b7514"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa4a6bdf99f698284faaeb5542b0b7514">&#9670;&nbsp;</a></span>runSpeed()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
@ -585,13 +635,15 @@ Protected Attributes</h2></td></tr>
</div><div class="memdoc">
<p>Poll the motor and step it if a step is due, implementing a constant speed as set by the most recent call to <a class="el" href="classAccelStepper.html#ae79c49ad69d5ccc9da0ee691fa4ca235">setSpeed()</a>. You must call this as frequently as possible, but at least once per step interval, </p><dl class="section return"><dt>Returns</dt><dd>true if the motor was stepped. </dd></dl>
<p>References <a class="el" href="classAccelStepper.html#a35162cdf8ed9a98f98984c177d5ade58">_direction</a>, <a class="el" href="classAccelStepper.html#a7468f91a925c689c3ba250f8d074d228ad604e0047f7cb47662c5a1cf6999337c">DIRECTION_CW</a>, and <a class="el" href="classAccelStepper.html#a8a419121702399d8ac66df4cc47481f4">step()</a>.</p>
<p class="reference">References <a class="el" href="classAccelStepper.html#a35162cdf8ed9a98f98984c177d5ade58">_direction</a>, <a class="el" href="classAccelStepper.html#a744fa74c2e181e75509a34b17c02e984">_stepInterval</a>, <a class="el" href="classAccelStepper.html#a7468f91a925c689c3ba250f8d074d228ad604e0047f7cb47662c5a1cf6999337c">DIRECTION_CW</a>, and <a class="el" href="classAccelStepper.html#a8a419121702399d8ac66df4cc47481f4">step()</a>.</p>
<p>Referenced by <a class="el" href="classMultiStepper.html#a26c2f53b1e7ddf5d5dfb333f6fb7fb92">MultiStepper::run()</a>, <a class="el" href="classAccelStepper.html#a608b2395b64ac15451d16d0371fe13ce">run()</a>, and <a class="el" href="classAccelStepper.html#a9270d20336e76ac1fd5bcd5b9c34f301">runSpeedToPosition()</a>.</p>
<p class="reference">Referenced by <a class="el" href="classAccelStepper.html#a608b2395b64ac15451d16d0371fe13ce">run()</a>, <a class="el" href="classMultiStepper.html#a26c2f53b1e7ddf5d5dfb333f6fb7fb92">MultiStepper::run()</a>, and <a class="el" href="classAccelStepper.html#a9270d20336e76ac1fd5bcd5b9c34f301">runSpeedToPosition()</a>.</p>
</div>
</div>
<a class="anchor" id="a9270d20336e76ac1fd5bcd5b9c34f301"></a>
<a id="a9270d20336e76ac1fd5bcd5b9c34f301"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9270d20336e76ac1fd5bcd5b9c34f301">&#9670;&nbsp;</a></span>runSpeedToPosition()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
@ -603,13 +655,15 @@ Protected Attributes</h2></td></tr>
</tr>
</table>
</div><div class="memdoc">
<p>Runs at the currently selected speed until the target position is reached Does not implement accelerations. </p><dl class="section return"><dt>Returns</dt><dd>true if it stepped </dd></dl>
<p>Executes <a class="el" href="classAccelStepper.html#aa4a6bdf99f698284faaeb5542b0b7514">runSpeed()</a> unless the targetPosition is reached. This function needs to be called often just like <a class="el" href="classAccelStepper.html#aa4a6bdf99f698284faaeb5542b0b7514">runSpeed()</a> or <a class="el" href="classAccelStepper.html#a608b2395b64ac15451d16d0371fe13ce">run()</a>. Will step the motor if a step is required at the currently selected speed unless the target position has been reached. Does not implement accelerations. </p><dl class="section return"><dt>Returns</dt><dd>true if it stepped </dd></dl>
<p>References <a class="el" href="classAccelStepper.html#a35162cdf8ed9a98f98984c177d5ade58">_direction</a>, <a class="el" href="classAccelStepper.html#a7468f91a925c689c3ba250f8d074d228a6959a4549f734bd771d418f995ba4fb4">DIRECTION_CCW</a>, <a class="el" href="classAccelStepper.html#a7468f91a925c689c3ba250f8d074d228ad604e0047f7cb47662c5a1cf6999337c">DIRECTION_CW</a>, and <a class="el" href="classAccelStepper.html#aa4a6bdf99f698284faaeb5542b0b7514">runSpeed()</a>.</p>
<p class="reference">References <a class="el" href="classAccelStepper.html#a35162cdf8ed9a98f98984c177d5ade58">_direction</a>, <a class="el" href="classAccelStepper.html#a7468f91a925c689c3ba250f8d074d228a6959a4549f734bd771d418f995ba4fb4">DIRECTION_CCW</a>, <a class="el" href="classAccelStepper.html#a7468f91a925c689c3ba250f8d074d228ad604e0047f7cb47662c5a1cf6999337c">DIRECTION_CW</a>, and <a class="el" href="classAccelStepper.html#aa4a6bdf99f698284faaeb5542b0b7514">runSpeed()</a>.</p>
</div>
</div>
<a class="anchor" id="a176c5d2e4c2f21e9e92b12e39a6f0e67"></a>
<a id="a176c5d2e4c2f21e9e92b12e39a6f0e67"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a176c5d2e4c2f21e9e92b12e39a6f0e67">&#9670;&nbsp;</a></span>runToNewPosition()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
@ -629,11 +683,13 @@ Protected Attributes</h2></td></tr>
</dd>
</dl>
<p>References <a class="el" href="classAccelStepper.html#ace236ede35f87c63d18da25810ec9736">moveTo()</a>, and <a class="el" href="classAccelStepper.html#a344f58fef8cc34ac5aa75ba4b665d21c">runToPosition()</a>.</p>
<p class="reference">References <a class="el" href="classAccelStepper.html#ace236ede35f87c63d18da25810ec9736">moveTo()</a>, and <a class="el" href="classAccelStepper.html#a344f58fef8cc34ac5aa75ba4b665d21c">runToPosition()</a>.</p>
</div>
</div>
<a class="anchor" id="a344f58fef8cc34ac5aa75ba4b665d21c"></a>
<a id="a344f58fef8cc34ac5aa75ba4b665d21c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a344f58fef8cc34ac5aa75ba4b665d21c">&#9670;&nbsp;</a></span>runToPosition()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
@ -647,13 +703,15 @@ Protected Attributes</h2></td></tr>
</div><div class="memdoc">
<p>Moves the motor (with acceleration/deceleration) to the target position and blocks until it is at position. Dont use this in event loops, since it blocks. </p>
<p>References <a class="el" href="classAccelStepper.html#a608b2395b64ac15451d16d0371fe13ce">run()</a>.</p>
<p class="reference">References <a class="el" href="classAccelStepper.html#a608b2395b64ac15451d16d0371fe13ce">run()</a>.</p>
<p>Referenced by <a class="el" href="classAccelStepper.html#a176c5d2e4c2f21e9e92b12e39a6f0e67">runToNewPosition()</a>.</p>
<p class="reference">Referenced by <a class="el" href="classAccelStepper.html#a176c5d2e4c2f21e9e92b12e39a6f0e67">runToNewPosition()</a>.</p>
</div>
</div>
<a class="anchor" id="adfb19e3cd2a028a1fe78131787604fd1"></a>
<a id="adfb19e3cd2a028a1fe78131787604fd1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adfb19e3cd2a028a1fe78131787604fd1">&#9670;&nbsp;</a></span>setAcceleration()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
@ -673,13 +731,15 @@ Protected Attributes</h2></td></tr>
</dd>
</dl>
<p>References <a class="el" href="classAccelStepper.html#affbee789b5c19165846cf0409860ae79">computeNewSpeed()</a>.</p>
<p class="reference">References <a class="el" href="classAccelStepper.html#a8b76f1ae6a49d2c2887b9fea30b8d84f">acceleration()</a>, and <a class="el" href="classAccelStepper.html#aab5944f43f869675958939c421bd9a01">computeNewSpeed()</a>.</p>
<p>Referenced by <a class="el" href="classAccelStepper.html#a3bc75bd6571b98a6177838ca81ac39ab">AccelStepper()</a>.</p>
<p class="reference">Referenced by <a class="el" href="classAccelStepper.html#a3bc75bd6571b98a6177838ca81ac39ab">AccelStepper()</a>.</p>
</div>
</div>
<a class="anchor" id="a9d917f014317fb9d3b5dc14e66f6c689"></a>
<a id="a9d917f014317fb9d3b5dc14e66f6c689"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9d917f014317fb9d3b5dc14e66f6c689">&#9670;&nbsp;</a></span>setCurrentPosition()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
@ -699,9 +759,15 @@ Protected Attributes</h2></td></tr>
</dd>
</dl>
<p class="reference">References <a class="el" href="classAccelStepper.html#a744fa74c2e181e75509a34b17c02e984">_stepInterval</a>.</p>
<p class="reference">Referenced by <a class="el" href="classMultiStepper.html#a26c2f53b1e7ddf5d5dfb333f6fb7fb92">MultiStepper::run()</a>.</p>
</div>
</div>
<a class="anchor" id="a56a81c5f00d02ca19646718e88e974c0"></a>
<a id="a56a81c5f00d02ca19646718e88e974c0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a56a81c5f00d02ca19646718e88e974c0">&#9670;&nbsp;</a></span>setEnablePin()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
@ -724,7 +790,9 @@ Protected Attributes</h2></td></tr>
</div>
</div>
<a class="anchor" id="abee8d466229b87accba33d6ec929c18f"></a>
<a id="abee8d466229b87accba33d6ec929c18f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abee8d466229b87accba33d6ec929c18f">&#9670;&nbsp;</a></span>setMaxSpeed()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
@ -737,18 +805,22 @@ Protected Attributes</h2></td></tr>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the maximum permitted speed. The <a class="el" href="classAccelStepper.html#a608b2395b64ac15451d16d0371fe13ce">run()</a> function will accelerate up to the speed set by this function. Caution: the maximum speed achievable depends on your processor and clock speed. </p><dl class="params"><dt>Parameters</dt><dd>
<p>Sets the maximum permitted speed. The <a class="el" href="classAccelStepper.html#a608b2395b64ac15451d16d0371fe13ce">run()</a> function will accelerate up to the speed set by this function. Caution: the maximum speed achievable depends on your processor and clock speed. The default maxSpeed is 1.0 steps per second. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">speed</td><td>The desired maximum speed in steps per second. Must be &gt; 0. Caution: Speeds that exceed the maximum speed supported by the processor may Result in non-linear accelerations and decelerations. </td></tr>
</table>
</dd>
</dl>
<p>References <a class="el" href="classAccelStepper.html#affbee789b5c19165846cf0409860ae79">computeNewSpeed()</a>, and <a class="el" href="classAccelStepper.html#a4f0989d0ae264e7eadfe1fa720769fb6">speed()</a>.</p>
<p class="reference">References <a class="el" href="classAccelStepper.html#aab5944f43f869675958939c421bd9a01">computeNewSpeed()</a>, and <a class="el" href="classAccelStepper.html#a4f0989d0ae264e7eadfe1fa720769fb6">speed()</a>.</p>
<p class="reference">Referenced by <a class="el" href="classAccelStepper.html#a3bc75bd6571b98a6177838ca81ac39ab">AccelStepper()</a>.</p>
</div>
</div>
<a class="anchor" id="af4d3818e691dad5dc518308796ccf154"></a>
<a id="af4d3818e691dad5dc518308796ccf154"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af4d3818e691dad5dc518308796ccf154">&#9670;&nbsp;</a></span>setMinPulseWidth()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
@ -763,14 +835,17 @@ Protected Attributes</h2></td></tr>
</div><div class="memdoc">
<p>Sets the minimum pulse width allowed by the stepper driver. The minimum practical pulse width is approximately 20 microseconds. Times less than 20 microseconds will usually result in 20 microseconds or so. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">minWidth</td><td>The minimum pulse width in microseconds. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">minWidth</td><td>The minimum pulse width in microseconds. <br />
</td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="af3c2516b6ce7c1ecbc2004107bb2a9ce"></a>
<a id="af3c2516b6ce7c1ecbc2004107bb2a9ce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af3c2516b6ce7c1ecbc2004107bb2a9ce">&#9670;&nbsp;</a></span>setOutputPins()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
@ -793,13 +868,15 @@ Protected Attributes</h2></td></tr>
</div><div class="memdoc">
<p>Low level function to set the motor output pins bit 0 of the mask corresponds to _pin[0] bit 1 of the mask corresponds to _pin[1] You can override this to impment, for example serial chip output insted of using the output pins directly </p>
<p>References <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5a0b8eea5cf0f8ce70b1959d2977ccc996">FULL3WIRE</a>, <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5adedd394a375190a3df8d4519c0d4dc2f">FULL4WIRE</a>, <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5a00c2387a5af43d8e97639699ab7a5c7f">HALF3WIRE</a>, and <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5aecc0900c55b777d2e885581b8c434b07">HALF4WIRE</a>.</p>
<p class="reference">References <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5a0b8eea5cf0f8ce70b1959d2977ccc996">FULL3WIRE</a>, <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5adedd394a375190a3df8d4519c0d4dc2f">FULL4WIRE</a>, <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5a00c2387a5af43d8e97639699ab7a5c7f">HALF3WIRE</a>, and <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5aecc0900c55b777d2e885581b8c434b07">HALF4WIRE</a>.</p>
<p>Referenced by <a class="el" href="classAccelStepper.html#a3591e29a236e2935afd7f64ff6c22006">disableOutputs()</a>, <a class="el" href="classAccelStepper.html#a63ef416bc039da539294e84a41e7d7dc">step1()</a>, <a class="el" href="classAccelStepper.html#a674e48a6bf99e7ad1f013c1e4414565a">step2()</a>, <a class="el" href="classAccelStepper.html#ad73c61aade2e10243dfb02aefa7ab8fd">step3()</a>, <a class="el" href="classAccelStepper.html#a8910bd9218a54dfb7e2372a6d0bcca0c">step4()</a>, <a class="el" href="classAccelStepper.html#a4b0faf1ebc0c584ab606c0c0f66986b0">step6()</a>, and <a class="el" href="classAccelStepper.html#aa909c6c3fcd3ea4b3ee1aa8b4d0f7e87">step8()</a>.</p>
<p class="reference">Referenced by <a class="el" href="classAccelStepper.html#a3591e29a236e2935afd7f64ff6c22006">disableOutputs()</a>, <a class="el" href="classAccelStepper.html#a63ef416bc039da539294e84a41e7d7dc">step1()</a>, <a class="el" href="classAccelStepper.html#a674e48a6bf99e7ad1f013c1e4414565a">step2()</a>, <a class="el" href="classAccelStepper.html#ad73c61aade2e10243dfb02aefa7ab8fd">step3()</a>, <a class="el" href="classAccelStepper.html#a8910bd9218a54dfb7e2372a6d0bcca0c">step4()</a>, <a class="el" href="classAccelStepper.html#a4b0faf1ebc0c584ab606c0c0f66986b0">step6()</a>, and <a class="el" href="classAccelStepper.html#aa909c6c3fcd3ea4b3ee1aa8b4d0f7e87">step8()</a>.</p>
</div>
</div>
<a class="anchor" id="ac62cae590c2f9c303519a3a1c4adc8ab"></a>
<a id="ac62cae590c2f9c303519a3a1c4adc8ab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac62cae590c2f9c303519a3a1c4adc8ab">&#9670;&nbsp;</a></span>setPinsInverted() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
@ -839,7 +916,9 @@ Protected Attributes</h2></td></tr>
</div>
</div>
<a class="anchor" id="a38298ac2dd852fb22259f6c4bbe08c94"></a>
<a id="a38298ac2dd852fb22259f6c4bbe08c94"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a38298ac2dd852fb22259f6c4bbe08c94">&#9670;&nbsp;</a></span>setPinsInverted() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
@ -893,7 +972,9 @@ Protected Attributes</h2></td></tr>
</div>
</div>
<a class="anchor" id="ae79c49ad69d5ccc9da0ee691fa4ca235"></a>
<a id="ae79c49ad69d5ccc9da0ee691fa4ca235"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae79c49ad69d5ccc9da0ee691fa4ca235">&#9670;&nbsp;</a></span>setSpeed()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
@ -908,18 +989,20 @@ Protected Attributes</h2></td></tr>
</div><div class="memdoc">
<p>Sets the desired constant speed for use with <a class="el" href="classAccelStepper.html#aa4a6bdf99f698284faaeb5542b0b7514">runSpeed()</a>. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">speed</td><td>The desired constant speed in steps per second. Positive is clockwise. Speeds of more than 1000 steps per second are unreliable. Very slow speeds may be set (eg 0.00027777 for once per hour, approximately. Speed accuracy depends on the Arduino crystal. Jitter depends on how frequently you call the <a class="el" href="classAccelStepper.html#aa4a6bdf99f698284faaeb5542b0b7514">runSpeed()</a> function. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">speed</td><td>The desired constant speed in steps per second. Positive is clockwise. Speeds of more than 1000 steps per second are unreliable. Very slow speeds may be set (eg 0.00027777 for once per hour, approximately. Speed accuracy depends on the Arduino crystal. Jitter depends on how frequently you call the <a class="el" href="classAccelStepper.html#aa4a6bdf99f698284faaeb5542b0b7514">runSpeed()</a> function. The speed will be limited by the current value of <a class="el" href="classAccelStepper.html#abee8d466229b87accba33d6ec929c18f">setMaxSpeed()</a> </td></tr>
</table>
</dd>
</dl>
<p>References <a class="el" href="classAccelStepper.html#a35162cdf8ed9a98f98984c177d5ade58">_direction</a>, <a class="el" href="classAccelStepper.html#a7468f91a925c689c3ba250f8d074d228a6959a4549f734bd771d418f995ba4fb4">DIRECTION_CCW</a>, <a class="el" href="classAccelStepper.html#a7468f91a925c689c3ba250f8d074d228ad604e0047f7cb47662c5a1cf6999337c">DIRECTION_CW</a>, and <a class="el" href="classAccelStepper.html#a4f0989d0ae264e7eadfe1fa720769fb6">speed()</a>.</p>
<p class="reference">References <a class="el" href="classAccelStepper.html#a35162cdf8ed9a98f98984c177d5ade58">_direction</a>, <a class="el" href="classAccelStepper.html#a744fa74c2e181e75509a34b17c02e984">_stepInterval</a>, <a class="el" href="classAccelStepper.html#a7468f91a925c689c3ba250f8d074d228a6959a4549f734bd771d418f995ba4fb4">DIRECTION_CCW</a>, <a class="el" href="classAccelStepper.html#a7468f91a925c689c3ba250f8d074d228ad604e0047f7cb47662c5a1cf6999337c">DIRECTION_CW</a>, and <a class="el" href="classAccelStepper.html#a4f0989d0ae264e7eadfe1fa720769fb6">speed()</a>.</p>
<p>Referenced by <a class="el" href="classMultiStepper.html#a291fec32a79390b6eb00296cffac49ee">MultiStepper::moveTo()</a>.</p>
<p class="reference">Referenced by <a class="el" href="classMultiStepper.html#a291fec32a79390b6eb00296cffac49ee">MultiStepper::moveTo()</a>.</p>
</div>
</div>
<a class="anchor" id="a4f0989d0ae264e7eadfe1fa720769fb6"></a>
<a id="a4f0989d0ae264e7eadfe1fa720769fb6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4f0989d0ae264e7eadfe1fa720769fb6">&#9670;&nbsp;</a></span>speed()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
@ -931,13 +1014,15 @@ Protected Attributes</h2></td></tr>
</tr>
</table>
</div><div class="memdoc">
<p>The most recently set speed </p><dl class="section return"><dt>Returns</dt><dd>the most recent speed in steps per second </dd></dl>
<p>The most recently set speed. </p><dl class="section return"><dt>Returns</dt><dd>the most recent speed in steps per second </dd></dl>
<p>Referenced by <a class="el" href="classAccelStepper.html#abee8d466229b87accba33d6ec929c18f">setMaxSpeed()</a>, and <a class="el" href="classAccelStepper.html#ae79c49ad69d5ccc9da0ee691fa4ca235">setSpeed()</a>.</p>
<p class="reference">Referenced by <a class="el" href="classAccelStepper.html#abee8d466229b87accba33d6ec929c18f">setMaxSpeed()</a>, and <a class="el" href="classAccelStepper.html#ae79c49ad69d5ccc9da0ee691fa4ca235">setSpeed()</a>.</p>
</div>
</div>
<a class="anchor" id="a8a419121702399d8ac66df4cc47481f4"></a>
<a id="a8a419121702399d8ac66df4cc47481f4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8a419121702399d8ac66df4cc47481f4">&#9670;&nbsp;</a></span>step()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
@ -965,13 +1050,15 @@ Protected Attributes</h2></td></tr>
</dd>
</dl>
<p>References <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5ac3523e4cf6763ba518d16fec3708ef23">DRIVER</a>, <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5a62a305b52f749ff8c89138273fbb012d">FULL2WIRE</a>, <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5a0b8eea5cf0f8ce70b1959d2977ccc996">FULL3WIRE</a>, <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5adedd394a375190a3df8d4519c0d4dc2f">FULL4WIRE</a>, <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5af5bb99ad9d67ad2d85f840e3abcfe068">FUNCTION</a>, <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5a00c2387a5af43d8e97639699ab7a5c7f">HALF3WIRE</a>, <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5aecc0900c55b777d2e885581b8c434b07">HALF4WIRE</a>, <a class="el" href="classAccelStepper.html#aa2913db789e6fa05756579ff82fe6e7e">step0()</a>, <a class="el" href="classAccelStepper.html#a63ef416bc039da539294e84a41e7d7dc">step1()</a>, <a class="el" href="classAccelStepper.html#a674e48a6bf99e7ad1f013c1e4414565a">step2()</a>, <a class="el" href="classAccelStepper.html#ad73c61aade2e10243dfb02aefa7ab8fd">step3()</a>, <a class="el" href="classAccelStepper.html#a8910bd9218a54dfb7e2372a6d0bcca0c">step4()</a>, <a class="el" href="classAccelStepper.html#a4b0faf1ebc0c584ab606c0c0f66986b0">step6()</a>, and <a class="el" href="classAccelStepper.html#aa909c6c3fcd3ea4b3ee1aa8b4d0f7e87">step8()</a>.</p>
<p class="reference">References <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5ac3523e4cf6763ba518d16fec3708ef23">DRIVER</a>, <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5a62a305b52f749ff8c89138273fbb012d">FULL2WIRE</a>, <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5a0b8eea5cf0f8ce70b1959d2977ccc996">FULL3WIRE</a>, <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5adedd394a375190a3df8d4519c0d4dc2f">FULL4WIRE</a>, <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5af5bb99ad9d67ad2d85f840e3abcfe068">FUNCTION</a>, <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5a00c2387a5af43d8e97639699ab7a5c7f">HALF3WIRE</a>, <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5aecc0900c55b777d2e885581b8c434b07">HALF4WIRE</a>, <a class="el" href="classAccelStepper.html#aa2913db789e6fa05756579ff82fe6e7e">step0()</a>, <a class="el" href="classAccelStepper.html#a63ef416bc039da539294e84a41e7d7dc">step1()</a>, <a class="el" href="classAccelStepper.html#a674e48a6bf99e7ad1f013c1e4414565a">step2()</a>, <a class="el" href="classAccelStepper.html#ad73c61aade2e10243dfb02aefa7ab8fd">step3()</a>, <a class="el" href="classAccelStepper.html#a8910bd9218a54dfb7e2372a6d0bcca0c">step4()</a>, <a class="el" href="classAccelStepper.html#a4b0faf1ebc0c584ab606c0c0f66986b0">step6()</a>, and <a class="el" href="classAccelStepper.html#aa909c6c3fcd3ea4b3ee1aa8b4d0f7e87">step8()</a>.</p>
<p>Referenced by <a class="el" href="classAccelStepper.html#aa4a6bdf99f698284faaeb5542b0b7514">runSpeed()</a>.</p>
<p class="reference">Referenced by <a class="el" href="classAccelStepper.html#aa4a6bdf99f698284faaeb5542b0b7514">runSpeed()</a>, <a class="el" href="classAccelStepper.html#aa2913db789e6fa05756579ff82fe6e7e">step0()</a>, <a class="el" href="classAccelStepper.html#a63ef416bc039da539294e84a41e7d7dc">step1()</a>, <a class="el" href="classAccelStepper.html#a674e48a6bf99e7ad1f013c1e4414565a">step2()</a>, <a class="el" href="classAccelStepper.html#ad73c61aade2e10243dfb02aefa7ab8fd">step3()</a>, <a class="el" href="classAccelStepper.html#a8910bd9218a54dfb7e2372a6d0bcca0c">step4()</a>, <a class="el" href="classAccelStepper.html#a4b0faf1ebc0c584ab606c0c0f66986b0">step6()</a>, <a class="el" href="classAccelStepper.html#aa909c6c3fcd3ea4b3ee1aa8b4d0f7e87">step8()</a>, <a class="el" href="classAccelStepper.html#af8abc9ede47286fa33b518e0bf297c6a">stepBackward()</a>, and <a class="el" href="classAccelStepper.html#af4908b53e1821f0a6d2dab509257b3e6">stepForward()</a>.</p>
</div>
</div>
<a class="anchor" id="aa2913db789e6fa05756579ff82fe6e7e"></a>
<a id="aa2913db789e6fa05756579ff82fe6e7e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa2913db789e6fa05756579ff82fe6e7e">&#9670;&nbsp;</a></span>step0()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
@ -999,11 +1086,15 @@ Protected Attributes</h2></td></tr>
</dd>
</dl>
<p>Referenced by <a class="el" href="classAccelStepper.html#a8a419121702399d8ac66df4cc47481f4">step()</a>.</p>
<p class="reference">References <a class="el" href="classAccelStepper.html#a8a419121702399d8ac66df4cc47481f4">step()</a>.</p>
<p class="reference">Referenced by <a class="el" href="classAccelStepper.html#a8a419121702399d8ac66df4cc47481f4">step()</a>.</p>
</div>
</div>
<a class="anchor" id="a63ef416bc039da539294e84a41e7d7dc"></a>
<a id="a63ef416bc039da539294e84a41e7d7dc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a63ef416bc039da539294e84a41e7d7dc">&#9670;&nbsp;</a></span>step1()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
@ -1031,13 +1122,15 @@ Protected Attributes</h2></td></tr>
</dd>
</dl>
<p>References <a class="el" href="classAccelStepper.html#a35162cdf8ed9a98f98984c177d5ade58">_direction</a>, and <a class="el" href="classAccelStepper.html#af3c2516b6ce7c1ecbc2004107bb2a9ce">setOutputPins()</a>.</p>
<p class="reference">References <a class="el" href="classAccelStepper.html#a35162cdf8ed9a98f98984c177d5ade58">_direction</a>, <a class="el" href="classAccelStepper.html#af3c2516b6ce7c1ecbc2004107bb2a9ce">setOutputPins()</a>, and <a class="el" href="classAccelStepper.html#a8a419121702399d8ac66df4cc47481f4">step()</a>.</p>
<p>Referenced by <a class="el" href="classAccelStepper.html#a8a419121702399d8ac66df4cc47481f4">step()</a>.</p>
<p class="reference">Referenced by <a class="el" href="classAccelStepper.html#a8a419121702399d8ac66df4cc47481f4">step()</a>.</p>
</div>
</div>
<a class="anchor" id="a674e48a6bf99e7ad1f013c1e4414565a"></a>
<a id="a674e48a6bf99e7ad1f013c1e4414565a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a674e48a6bf99e7ad1f013c1e4414565a">&#9670;&nbsp;</a></span>step2()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
@ -1065,13 +1158,15 @@ Protected Attributes</h2></td></tr>
</dd>
</dl>
<p>References <a class="el" href="classAccelStepper.html#af3c2516b6ce7c1ecbc2004107bb2a9ce">setOutputPins()</a>.</p>
<p class="reference">References <a class="el" href="classAccelStepper.html#af3c2516b6ce7c1ecbc2004107bb2a9ce">setOutputPins()</a>, and <a class="el" href="classAccelStepper.html#a8a419121702399d8ac66df4cc47481f4">step()</a>.</p>
<p>Referenced by <a class="el" href="classAccelStepper.html#a8a419121702399d8ac66df4cc47481f4">step()</a>.</p>
<p class="reference">Referenced by <a class="el" href="classAccelStepper.html#a8a419121702399d8ac66df4cc47481f4">step()</a>.</p>
</div>
</div>
<a class="anchor" id="ad73c61aade2e10243dfb02aefa7ab8fd"></a>
<a id="ad73c61aade2e10243dfb02aefa7ab8fd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad73c61aade2e10243dfb02aefa7ab8fd">&#9670;&nbsp;</a></span>step3()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
@ -1099,13 +1194,15 @@ Protected Attributes</h2></td></tr>
</dd>
</dl>
<p>References <a class="el" href="classAccelStepper.html#af3c2516b6ce7c1ecbc2004107bb2a9ce">setOutputPins()</a>.</p>
<p class="reference">References <a class="el" href="classAccelStepper.html#af3c2516b6ce7c1ecbc2004107bb2a9ce">setOutputPins()</a>, and <a class="el" href="classAccelStepper.html#a8a419121702399d8ac66df4cc47481f4">step()</a>.</p>
<p>Referenced by <a class="el" href="classAccelStepper.html#a8a419121702399d8ac66df4cc47481f4">step()</a>.</p>
<p class="reference">Referenced by <a class="el" href="classAccelStepper.html#a8a419121702399d8ac66df4cc47481f4">step()</a>.</p>
</div>
</div>
<a class="anchor" id="a8910bd9218a54dfb7e2372a6d0bcca0c"></a>
<a id="a8910bd9218a54dfb7e2372a6d0bcca0c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8910bd9218a54dfb7e2372a6d0bcca0c">&#9670;&nbsp;</a></span>step4()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
@ -1133,13 +1230,15 @@ Protected Attributes</h2></td></tr>
</dd>
</dl>
<p>References <a class="el" href="classAccelStepper.html#af3c2516b6ce7c1ecbc2004107bb2a9ce">setOutputPins()</a>.</p>
<p class="reference">References <a class="el" href="classAccelStepper.html#af3c2516b6ce7c1ecbc2004107bb2a9ce">setOutputPins()</a>, and <a class="el" href="classAccelStepper.html#a8a419121702399d8ac66df4cc47481f4">step()</a>.</p>
<p>Referenced by <a class="el" href="classAccelStepper.html#a8a419121702399d8ac66df4cc47481f4">step()</a>.</p>
<p class="reference">Referenced by <a class="el" href="classAccelStepper.html#a8a419121702399d8ac66df4cc47481f4">step()</a>.</p>
</div>
</div>
<a class="anchor" id="a4b0faf1ebc0c584ab606c0c0f66986b0"></a>
<a id="a4b0faf1ebc0c584ab606c0c0f66986b0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4b0faf1ebc0c584ab606c0c0f66986b0">&#9670;&nbsp;</a></span>step6()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
@ -1167,13 +1266,15 @@ Protected Attributes</h2></td></tr>
</dd>
</dl>
<p>References <a class="el" href="classAccelStepper.html#af3c2516b6ce7c1ecbc2004107bb2a9ce">setOutputPins()</a>.</p>
<p class="reference">References <a class="el" href="classAccelStepper.html#af3c2516b6ce7c1ecbc2004107bb2a9ce">setOutputPins()</a>, and <a class="el" href="classAccelStepper.html#a8a419121702399d8ac66df4cc47481f4">step()</a>.</p>
<p>Referenced by <a class="el" href="classAccelStepper.html#a8a419121702399d8ac66df4cc47481f4">step()</a>.</p>
<p class="reference">Referenced by <a class="el" href="classAccelStepper.html#a8a419121702399d8ac66df4cc47481f4">step()</a>.</p>
</div>
</div>
<a class="anchor" id="aa909c6c3fcd3ea4b3ee1aa8b4d0f7e87"></a>
<a id="aa909c6c3fcd3ea4b3ee1aa8b4d0f7e87"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa909c6c3fcd3ea4b3ee1aa8b4d0f7e87">&#9670;&nbsp;</a></span>step8()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
@ -1194,20 +1295,78 @@ Protected Attributes</h2></td></tr>
</tr>
</table>
</div><div class="memdoc">
<p>Called to execute a step on a 4 pin half-steper motor. Only called when a new step is required. Subclasses may override to implement new stepping interfaces. The default sets or clears the outputs of pin1, pin2, pin3, pin4. </p><dl class="params"><dt>Parameters</dt><dd>
<p>Called to execute a step on a 4 pin half-stepper motor. Only called when a new step is required. Subclasses may override to implement new stepping interfaces. The default sets or clears the outputs of pin1, pin2, pin3, pin4. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">step</td><td>The current step phase number (0 to 7) </td></tr>
</table>
</dd>
</dl>
<p>References <a class="el" href="classAccelStepper.html#af3c2516b6ce7c1ecbc2004107bb2a9ce">setOutputPins()</a>.</p>
<p class="reference">References <a class="el" href="classAccelStepper.html#af3c2516b6ce7c1ecbc2004107bb2a9ce">setOutputPins()</a>, and <a class="el" href="classAccelStepper.html#a8a419121702399d8ac66df4cc47481f4">step()</a>.</p>
<p>Referenced by <a class="el" href="classAccelStepper.html#a8a419121702399d8ac66df4cc47481f4">step()</a>.</p>
<p class="reference">Referenced by <a class="el" href="classAccelStepper.html#a8a419121702399d8ac66df4cc47481f4">step()</a>.</p>
</div>
</div>
<a class="anchor" id="a638817b85aed9d5cd15c76a76c00aced"></a>
<a id="af8abc9ede47286fa33b518e0bf297c6a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af8abc9ede47286fa33b518e0bf297c6a">&#9670;&nbsp;</a></span>stepBackward()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">long AccelStepper::stepBackward </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Called to execute a counter-clockwise(-) step. Only called when a new step is required. This decrements the _currentPos and calls <a class="el" href="classAccelStepper.html#a8a419121702399d8ac66df4cc47481f4">step()</a> </p><dl class="section return"><dt>Returns</dt><dd>the updated current position </dd></dl>
<p class="reference">References <a class="el" href="classAccelStepper.html#a8a419121702399d8ac66df4cc47481f4">step()</a>.</p>
</div>
</div>
<a id="af4908b53e1821f0a6d2dab509257b3e6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af4908b53e1821f0a6d2dab509257b3e6">&#9670;&nbsp;</a></span>stepForward()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">long AccelStepper::stepForward </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Called to execute a clockwise(+) step. Only called when a new step is required. This increments the _currentPos and calls <a class="el" href="classAccelStepper.html#a8a419121702399d8ac66df4cc47481f4">step()</a> </p><dl class="section return"><dt>Returns</dt><dd>the updated current position </dd></dl>
<p class="reference">References <a class="el" href="classAccelStepper.html#a8a419121702399d8ac66df4cc47481f4">step()</a>.</p>
</div>
</div>
<a id="a638817b85aed9d5cd15c76a76c00aced"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a638817b85aed9d5cd15c76a76c00aced">&#9670;&nbsp;</a></span>stop()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
@ -1221,11 +1380,13 @@ Protected Attributes</h2></td></tr>
</div><div class="memdoc">
<p>Sets a new target position that causes the stepper to stop as quickly as possible, using the current speed and acceleration parameters. </p>
<p>References <a class="el" href="classAccelStepper.html#a68942c66e78fb7f7b5f0cdade6eb7f06">move()</a>.</p>
<p class="reference">References <a class="el" href="classAccelStepper.html#a68942c66e78fb7f7b5f0cdade6eb7f06">move()</a>.</p>
</div>
</div>
<a class="anchor" id="a96685e0945b7cf75d5959da679cd911e"></a>
<a id="a96685e0945b7cf75d5959da679cd911e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a96685e0945b7cf75d5959da679cd911e">&#9670;&nbsp;</a></span>targetPosition()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
@ -1242,7 +1403,9 @@ Protected Attributes</h2></td></tr>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a35162cdf8ed9a98f98984c177d5ade58"></a>
<a id="a35162cdf8ed9a98f98984c177d5ade58"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a35162cdf8ed9a98f98984c177d5ade58">&#9670;&nbsp;</a></span>_direction</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
@ -1261,7 +1424,32 @@ Protected Attributes</h2></td></tr>
</div><div class="memdoc">
<p>Current direction motor is spinning in Protected because some peoples subclasses need it to be so </p>
<p>Referenced by <a class="el" href="classAccelStepper.html#a3bc75bd6571b98a6177838ca81ac39ab">AccelStepper()</a>, <a class="el" href="classAccelStepper.html#affbee789b5c19165846cf0409860ae79">computeNewSpeed()</a>, <a class="el" href="classAccelStepper.html#aa4a6bdf99f698284faaeb5542b0b7514">runSpeed()</a>, <a class="el" href="classAccelStepper.html#a9270d20336e76ac1fd5bcd5b9c34f301">runSpeedToPosition()</a>, <a class="el" href="classAccelStepper.html#ae79c49ad69d5ccc9da0ee691fa4ca235">setSpeed()</a>, and <a class="el" href="classAccelStepper.html#a63ef416bc039da539294e84a41e7d7dc">step1()</a>.</p>
<p class="reference">Referenced by <a class="el" href="classAccelStepper.html#a3bc75bd6571b98a6177838ca81ac39ab">AccelStepper()</a>, <a class="el" href="classAccelStepper.html#aab5944f43f869675958939c421bd9a01">computeNewSpeed()</a>, <a class="el" href="classAccelStepper.html#aa4a6bdf99f698284faaeb5542b0b7514">runSpeed()</a>, <a class="el" href="classAccelStepper.html#a9270d20336e76ac1fd5bcd5b9c34f301">runSpeedToPosition()</a>, <a class="el" href="classAccelStepper.html#ae79c49ad69d5ccc9da0ee691fa4ca235">setSpeed()</a>, and <a class="el" href="classAccelStepper.html#a63ef416bc039da539294e84a41e7d7dc">step1()</a>.</p>
</div>
</div>
<a id="a744fa74c2e181e75509a34b17c02e984"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a744fa74c2e181e75509a34b17c02e984">&#9670;&nbsp;</a></span>_stepInterval</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">unsigned long AccelStepper::_stepInterval</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>The current interval between steps in microseconds. 0 means the motor is currently stopped with _speed == 0 </p>
<p class="reference">Referenced by <a class="el" href="classAccelStepper.html#a3bc75bd6571b98a6177838ca81ac39ab">AccelStepper()</a>, <a class="el" href="classAccelStepper.html#aab5944f43f869675958939c421bd9a01">computeNewSpeed()</a>, <a class="el" href="classAccelStepper.html#aa4a6bdf99f698284faaeb5542b0b7514">runSpeed()</a>, <a class="el" href="classAccelStepper.html#a9d917f014317fb9d3b5dc14e66f6c689">setCurrentPosition()</a>, and <a class="el" href="classAccelStepper.html#ae79c49ad69d5ccc9da0ee691fa4ca235">setSpeed()</a>.</p>
</div>
</div>
@ -1272,9 +1460,7 @@ Protected Attributes</h2></td></tr>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>

View File

@ -1,9 +1,13 @@
/* The standard CSS for doxygen 1.8.11 */
/* The standard CSS for doxygen 1.9.1 */
body, table, div, p, dl {
font: 400 14px/22px Roboto,sans-serif;
}
p.reference, p.definition {
font: 400 14px/22px Roboto,sans-serif;
}
/* @group Heading Levels */
h1.groupheader {
@ -49,17 +53,24 @@ dt {
font-weight: bold;
}
div.multicol {
ul.multicol {
-moz-column-gap: 1em;
-webkit-column-gap: 1em;
column-gap: 1em;
-moz-column-count: 3;
-webkit-column-count: 3;
column-count: 3;
}
p.startli, p.startdd {
margin-top: 2px;
}
th p.starttd, th p.intertd, th p.endtd {
font-size: 100%;
font-weight: 700;
}
p.starttd {
margin-top: 0px;
}
@ -76,6 +87,15 @@ p.endtd {
margin-bottom: 2px;
}
p.interli {
}
p.interdd {
}
p.intertd {
}
/* @end */
caption {
@ -92,21 +112,87 @@ h3.version {
text-align: center;
}
div.qindex, div.navtab{
background-color: #EBEFF6;
border: 1px solid #A3B4D7;
text-align: center;
div.navtab {
border-right: 1px solid #A3B4D7;
padding-right: 15px;
text-align: right;
line-height: 110%;
}
div.qindex, div.navpath {
div.navtab table {
border-spacing: 0;
}
td.navtab {
padding-right: 6px;
padding-left: 6px;
}
td.navtabHL {
background-image: url('tab_a.png');
background-repeat:repeat-x;
padding-right: 6px;
padding-left: 6px;
}
td.navtabHL a, td.navtabHL a:visited {
color: #fff;
text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
}
a.navtab {
font-weight: bold;
}
div.qindex{
text-align: center;
width: 100%;
line-height: 140%;
font-size: 130%;
color: #A0A0A0;
}
div.navtab {
margin-right: 15px;
dt.alphachar{
font-size: 180%;
font-weight: bold;
}
.alphachar a{
color: black;
}
.alphachar a:hover, .alphachar a:visited{
text-decoration: none;
}
.classindex dl {
padding: 25px;
column-count:1
}
.classindex dd {
display:inline-block;
margin-left: 50px;
width: 90%;
line-height: 1.15em;
}
.classindex dl.odd {
background-color: #F8F9FC;
}
@media(min-width: 1120px) {
.classindex dl {
column-count:2
}
}
@media(min-width: 1320px) {
.classindex dl {
column-count:3
}
}
/* @group Link Styling */
a {
@ -123,19 +209,8 @@ a:hover {
text-decoration: underline;
}
a.qindex {
font-weight: bold;
}
a.qindexHL {
font-weight: bold;
background-color: #9CAFD4;
color: #ffffff;
border: 1px double #869DCA;
}
.contents a.qindexHL:visited {
color: #ffffff;
color: #FFFFFF;
}
a.el {
@ -159,6 +234,25 @@ dl.el {
margin-left: -1cm;
}
ul {
overflow: hidden; /*Fixed: list item bullets overlap floating elements*/
}
#side-nav ul {
overflow: visible; /* reset ul rule for scroll bar in GENERATE_TREEVIEW window */
}
#main-nav ul {
overflow: visible; /* reset ul rule for the navigation bar drop down lists */
}
.fragment {
text-align: left;
direction: ltr;
overflow-x: auto; /*Fixed: fragment lines overlap floating elements*/
overflow-y: hidden;
}
pre.fragment {
border: 1px solid #C4CFE5;
background-color: #FBFCFD;
@ -173,7 +267,7 @@ pre.fragment {
}
div.fragment {
padding: 4px 6px;
padding: 0 0 1px 0; /*Fixed: last line underline overlap border*/
margin: 4px 8px 4px 2px;
background-color: #FBFCFD;
border: 1px solid #C4CFE5;
@ -232,10 +326,19 @@ span.lineno a:hover {
background-color: #C8C8C8;
}
.lineno {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
div.ah, span.ah {
background-color: black;
font-weight: bold;
color: #ffffff;
color: #FFFFFF;
margin-bottom: 3px;
margin-top: 3px;
padding: 0.2em;
@ -311,7 +414,7 @@ img.formulaDsp {
}
img.formulaInl {
img.formulaInl, img.inline {
vertical-align: middle;
}
@ -389,6 +492,13 @@ blockquote {
padding: 0 12px 0 16px;
}
blockquote.DocNodeRTL {
border-left: 0;
border-right: 2px solid #9CAFD4;
margin: 0 4px 0 24px;
padding: 0 16px 0 12px;
}
/* @end */
/*
@ -485,7 +595,7 @@ table.memberdecls {
white-space: nowrap;
}
.memItemRight {
.memItemRight, .memTemplItemRight {
width: 100%;
}
@ -501,6 +611,29 @@ table.memberdecls {
/* Styles for detailed member documentation */
.memtitle {
padding: 8px;
border-top: 1px solid #A8B8D9;
border-left: 1px solid #A8B8D9;
border-right: 1px solid #A8B8D9;
border-top-right-radius: 4px;
border-top-left-radius: 4px;
margin-bottom: -1px;
background-image: url('nav_f.png');
background-repeat: repeat-x;
background-color: #E2E8F2;
line-height: 1.25;
font-weight: 300;
float:left;
}
.permalink
{
font-size: 65%;
display: inline-block;
vertical-align: middle;
}
.memtemplate {
font-size: 80%;
color: #4665A2;
@ -539,7 +672,7 @@ table.memberdecls {
}
.memname {
font-weight: bold;
font-weight: 400;
margin-left: 6px;
}
@ -555,24 +688,24 @@ table.memberdecls {
color: #253555;
font-weight: bold;
text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
background-image:url('nav_f.png');
background-repeat:repeat-x;
background-color: #E2E8F2;
background-color: #DFE5F1;
/* opera specific markup */
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
border-top-right-radius: 4px;
border-top-left-radius: 4px;
/* firefox specific markup */
-moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
-moz-border-radius-topright: 4px;
-moz-border-radius-topleft: 4px;
/* webkit specific markup */
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
-webkit-border-top-right-radius: 4px;
-webkit-border-top-left-radius: 4px;
}
.overload {
font-family: "courier new",courier,monospace;
font-size: 65%;
}
.memdoc, dl.reflist dd {
border-bottom: 1px solid #A8B8D9;
border-left: 1px solid #A8B8D9;
@ -630,17 +763,17 @@ dl.reflist dd {
padding-left: 0px;
}
.params .paramname, .retval .paramname {
.params .paramname, .retval .paramname, .tparams .paramname, .exception .paramname {
font-weight: bold;
vertical-align: top;
}
.params .paramtype {
.params .paramtype, .tparams .paramtype {
font-style: italic;
vertical-align: top;
}
.params .paramdir {
.params .paramdir, .tparams .paramdir {
font-family: "courier new",courier,monospace;
vertical-align: top;
}
@ -914,6 +1047,7 @@ table.fieldtable {
padding-bottom: 4px;
padding-top: 5px;
text-align:left;
font-weight: 400;
-moz-border-radius-topleft: 4px;
-moz-border-radius-topright: 4px;
-webkit-border-top-left-radius: 4px;
@ -1044,71 +1178,142 @@ div.headertitle
padding: 5px 5px 5px 10px;
}
dl
{
padding: 0 0 0 10px;
.PageDocRTL-title div.headertitle {
text-align: right;
direction: rtl;
}
/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */
dl.section
{
dl {
padding: 0 0 0 0;
}
/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug, dl.examples */
dl.section {
margin-left: 0px;
padding-left: 0px;
}
dl.note
{
margin-left:-7px;
dl.section.DocNodeRTL {
margin-right: 0px;
padding-right: 0px;
}
dl.note {
margin-left: -7px;
padding-left: 3px;
border-left:4px solid;
border-left: 4px solid;
border-color: #D0C000;
}
dl.warning, dl.attention
{
margin-left:-7px;
dl.note.DocNodeRTL {
margin-left: 0;
padding-left: 0;
border-left: 0;
margin-right: -7px;
padding-right: 3px;
border-right: 4px solid;
border-color: #D0C000;
}
dl.warning, dl.attention {
margin-left: -7px;
padding-left: 3px;
border-left:4px solid;
border-left: 4px solid;
border-color: #FF0000;
}
dl.pre, dl.post, dl.invariant
{
margin-left:-7px;
dl.warning.DocNodeRTL, dl.attention.DocNodeRTL {
margin-left: 0;
padding-left: 0;
border-left: 0;
margin-right: -7px;
padding-right: 3px;
border-right: 4px solid;
border-color: #FF0000;
}
dl.pre, dl.post, dl.invariant {
margin-left: -7px;
padding-left: 3px;
border-left:4px solid;
border-left: 4px solid;
border-color: #00D000;
}
dl.deprecated
{
margin-left:-7px;
dl.pre.DocNodeRTL, dl.post.DocNodeRTL, dl.invariant.DocNodeRTL {
margin-left: 0;
padding-left: 0;
border-left: 0;
margin-right: -7px;
padding-right: 3px;
border-right: 4px solid;
border-color: #00D000;
}
dl.deprecated {
margin-left: -7px;
padding-left: 3px;
border-left:4px solid;
border-left: 4px solid;
border-color: #505050;
}
dl.todo
{
margin-left:-7px;
dl.deprecated.DocNodeRTL {
margin-left: 0;
padding-left: 0;
border-left: 0;
margin-right: -7px;
padding-right: 3px;
border-right: 4px solid;
border-color: #505050;
}
dl.todo {
margin-left: -7px;
padding-left: 3px;
border-left:4px solid;
border-left: 4px solid;
border-color: #00C0E0;
}
dl.test
{
margin-left:-7px;
dl.todo.DocNodeRTL {
margin-left: 0;
padding-left: 0;
border-left: 0;
margin-right: -7px;
padding-right: 3px;
border-right: 4px solid;
border-color: #00C0E0;
}
dl.test {
margin-left: -7px;
padding-left: 3px;
border-left:4px solid;
border-left: 4px solid;
border-color: #3030E0;
}
dl.bug
{
margin-left:-7px;
dl.test.DocNodeRTL {
margin-left: 0;
padding-left: 0;
border-left: 0;
margin-right: -7px;
padding-right: 3px;
border-right: 4px solid;
border-color: #3030E0;
}
dl.bug {
margin-left: -7px;
padding-left: 3px;
border-left:4px solid;
border-left: 4px solid;
border-color: #C08050;
}
dl.bug.DocNodeRTL {
margin-left: 0;
padding-left: 0;
border-left: 0;
margin-right: -7px;
padding-right: 3px;
border-right: 4px solid;
border-color: #C08050;
}
@ -1178,6 +1383,11 @@ dl.section dd {
text-align: center;
}
.plantumlgraph
{
text-align: center;
}
.diagraph
{
text-align: center;
@ -1203,10 +1413,12 @@ dl.citelist dt {
font-weight:bold;
margin-right:10px;
padding:5px;
text-align:right;
width:52px;
}
dl.citelist dd {
margin:2px 0;
margin:2px 0 2px 72px;
padding:5px 0;
}
@ -1221,6 +1433,11 @@ div.toc {
width: 200px;
}
.PageDocRTL-title div.toc {
float: left !important;
text-align: right;
}
div.toc li {
background: url("bdwn.png") no-repeat scroll 0 5px transparent;
font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif;
@ -1229,6 +1446,12 @@ div.toc li {
padding-top: 2px;
}
.PageDocRTL-title div.toc li {
background-position-x: right !important;
padding-left: 0 !important;
padding-right: 10px;
}
div.toc h3 {
font: bold 12px/1.2 Arial,FreeSans,sans-serif;
color: #4665A2;
@ -1258,6 +1481,32 @@ div.toc li.level4 {
margin-left: 45px;
}
span.emoji {
/* font family used at the site: https://unicode.org/emoji/charts/full-emoji-list.html
* font-family: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", Times, Symbola, Aegyptus, Code2000, Code2001, Code2002, Musica, serif, LastResort;
*/
}
.PageDocRTL-title div.toc li.level1 {
margin-left: 0 !important;
margin-right: 0;
}
.PageDocRTL-title div.toc li.level2 {
margin-left: 0 !important;
margin-right: 15px;
}
.PageDocRTL-title div.toc li.level3 {
margin-left: 0 !important;
margin-right: 30px;
}
.PageDocRTL-title div.toc li.level4 {
margin-left: 0 !important;
margin-right: 45px;
}
.inherit_header {
font-weight: bold;
color: gray;
@ -1371,7 +1620,7 @@ tr.heading h2 {
}
#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after {
border-top-color: #ffffff;
border-top-color: #FFFFFF;
border-width: 10px;
margin: 0px -10px;
}
@ -1399,7 +1648,7 @@ tr.heading h2 {
}
#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after {
border-bottom-color: #ffffff;
border-bottom-color: #FFFFFF;
border-width: 10px;
margin: 0px -10px;
}
@ -1426,7 +1675,7 @@ tr.heading h2 {
left: 100%;
}
#powerTip.e:after {
border-left-color: #ffffff;
border-left-color: #FFFFFF;
border-width: 10px;
top: 50%;
margin-top: -10px;
@ -1442,7 +1691,7 @@ tr.heading h2 {
right: 100%;
}
#powerTip.w:after {
border-right-color: #ffffff;
border-right-color: #FFFFFF;
border-width: 10px;
top: 50%;
margin-top: -10px;
@ -1473,3 +1722,72 @@ tr.heading h2 {
}
}
/* @group Markdown */
table.markdownTable {
border-collapse:collapse;
margin-top: 4px;
margin-bottom: 4px;
}
table.markdownTable td, table.markdownTable th {
border: 1px solid #2D4068;
padding: 3px 7px 2px;
}
table.markdownTable tr {
}
th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone {
background-color: #374F7F;
color: #FFFFFF;
font-size: 110%;
padding-bottom: 4px;
padding-top: 5px;
}
th.markdownTableHeadLeft, td.markdownTableBodyLeft {
text-align: left
}
th.markdownTableHeadRight, td.markdownTableBodyRight {
text-align: right
}
th.markdownTableHeadCenter, td.markdownTableBodyCenter {
text-align: center
}
.DocNodeRTL {
text-align: right;
direction: rtl;
}
.DocNodeLTR {
text-align: left;
direction: ltr;
}
table.DocNodeRTL {
width: auto;
margin-right: 0;
margin-left: auto;
}
table.DocNodeLTR {
width: auto;
margin-right: auto;
margin-left: 0;
}
tt, code, kbd, samp
{
display: inline-block;
direction:ltr;
}
/* @end */
u {
text-decoration: underline;
}

View File

@ -1,9 +1,10 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AccelStepper: File List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
@ -25,20 +26,16 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li class="current"><a href="files.html"><span>File&#160;List</span></a></li>
</ul>
</div>
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
@ -54,9 +51,7 @@
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>

View File

@ -1,9 +1,10 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AccelStepper: Class Members</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
@ -25,58 +26,34 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li class="current"><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
<div id="navrow3" class="tabs2">
<ul class="tablist">
<li class="current"><a href="functions.html"><span>All</span></a></li>
<li><a href="functions_func.html"><span>Functions</span></a></li>
<li><a href="functions_vars.html"><span>Variables</span></a></li>
<li><a href="functions_enum.html"><span>Enumerations</span></a></li>
<li><a href="functions_eval.html"><span>Enumerator</span></a></li>
</ul>
</div>
<div id="navrow4" class="tabs3">
<ul class="tablist">
<li><a href="#index__"><span>_</span></a></li>
<li><a href="#index_a"><span>a</span></a></li>
<li><a href="#index_c"><span>c</span></a></li>
<li><a href="#index_d"><span>d</span></a></li>
<li><a href="#index_e"><span>e</span></a></li>
<li><a href="#index_f"><span>f</span></a></li>
<li><a href="#index_h"><span>h</span></a></li>
<li><a href="#index_i"><span>i</span></a></li>
<li><a href="#index_m"><span>m</span></a></li>
<li><a href="#index_r"><span>r</span></a></li>
<li><a href="#index_s"><span>s</span></a></li>
<li class="current"><a href="#index_t"><span>t</span></a></li>
</ul>
</div>
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="contents">
<div class="textblock">Here is a list of all documented class members with links to the class documentation for each member:</div>
<h3><a class="anchor" id="index__"></a>- _ -</h3><ul>
<h3><a id="index__5F"></a>- _ -</h3><ul>
<li>_direction
: <a class="el" href="classAccelStepper.html#a35162cdf8ed9a98f98984c177d5ade58">AccelStepper</a>
</li>
<li>_stepInterval
: <a class="el" href="classAccelStepper.html#a744fa74c2e181e75509a34b17c02e984">AccelStepper</a>
</li>
</ul>
<h3><a class="anchor" id="index_a"></a>- a -</h3><ul>
<h3><a id="index_a"></a>- a -</h3><ul>
<li>acceleration()
: <a class="el" href="classAccelStepper.html#a8b76f1ae6a49d2c2887b9fea30b8d84f">AccelStepper</a>
</li>
<li>AccelStepper()
: <a class="el" href="classAccelStepper.html#a3bc75bd6571b98a6177838ca81ac39ab">AccelStepper</a>
</li>
@ -86,9 +63,9 @@
</ul>
<h3><a class="anchor" id="index_c"></a>- c -</h3><ul>
<h3><a id="index_c"></a>- c -</h3><ul>
<li>computeNewSpeed()
: <a class="el" href="classAccelStepper.html#affbee789b5c19165846cf0409860ae79">AccelStepper</a>
: <a class="el" href="classAccelStepper.html#aab5944f43f869675958939c421bd9a01">AccelStepper</a>
</li>
<li>currentPosition()
: <a class="el" href="classAccelStepper.html#a5dce13ab2a1b02b8f443318886bf6fc5">AccelStepper</a>
@ -96,7 +73,7 @@
</ul>
<h3><a class="anchor" id="index_d"></a>- d -</h3><ul>
<h3><a id="index_d"></a>- d -</h3><ul>
<li>Direction
: <a class="el" href="classAccelStepper.html#a7468f91a925c689c3ba250f8d074d228">AccelStepper</a>
</li>
@ -118,14 +95,14 @@
</ul>
<h3><a class="anchor" id="index_e"></a>- e -</h3><ul>
<h3><a id="index_e"></a>- e -</h3><ul>
<li>enableOutputs()
: <a class="el" href="classAccelStepper.html#aa279a50d30d0413f570c692cff071643">AccelStepper</a>
</li>
</ul>
<h3><a class="anchor" id="index_f"></a>- f -</h3><ul>
<h3><a id="index_f"></a>- f -</h3><ul>
<li>FULL2WIRE
: <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5a62a305b52f749ff8c89138273fbb012d">AccelStepper</a>
</li>
@ -141,7 +118,7 @@
</ul>
<h3><a class="anchor" id="index_h"></a>- h -</h3><ul>
<h3><a id="index_h"></a>- h -</h3><ul>
<li>HALF3WIRE
: <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5a00c2387a5af43d8e97639699ab7a5c7f">AccelStepper</a>
</li>
@ -151,14 +128,14 @@
</ul>
<h3><a class="anchor" id="index_i"></a>- i -</h3><ul>
<h3><a id="index_i"></a>- i -</h3><ul>
<li>isRunning()
: <a class="el" href="classAccelStepper.html#a3a60cc0b962f8ceb81ee1e6f36443ceb">AccelStepper</a>
</li>
</ul>
<h3><a class="anchor" id="index_m"></a>- m -</h3><ul>
<h3><a id="index_m"></a>- m -</h3><ul>
<li>maxSpeed()
: <a class="el" href="classAccelStepper.html#a6123a1dfb4495d8bd2646288eae60d7f">AccelStepper</a>
</li>
@ -178,7 +155,7 @@
</ul>
<h3><a class="anchor" id="index_r"></a>- r -</h3><ul>
<h3><a id="index_r"></a>- r -</h3><ul>
<li>run()
: <a class="el" href="classAccelStepper.html#a608b2395b64ac15451d16d0371fe13ce">AccelStepper</a>
, <a class="el" href="classMultiStepper.html#a26c2f53b1e7ddf5d5dfb333f6fb7fb92">MultiStepper</a>
@ -199,7 +176,7 @@
</ul>
<h3><a class="anchor" id="index_s"></a>- s -</h3><ul>
<h3><a id="index_s"></a>- s -</h3><ul>
<li>setAcceleration()
: <a class="el" href="classAccelStepper.html#adfb19e3cd2a028a1fe78131787604fd1">AccelStepper</a>
</li>
@ -251,23 +228,34 @@
<li>step8()
: <a class="el" href="classAccelStepper.html#aa909c6c3fcd3ea4b3ee1aa8b4d0f7e87">AccelStepper</a>
</li>
<li>stepBackward()
: <a class="el" href="classAccelStepper.html#af8abc9ede47286fa33b518e0bf297c6a">AccelStepper</a>
</li>
<li>stepForward()
: <a class="el" href="classAccelStepper.html#af4908b53e1821f0a6d2dab509257b3e6">AccelStepper</a>
</li>
<li>stop()
: <a class="el" href="classAccelStepper.html#a638817b85aed9d5cd15c76a76c00aced">AccelStepper</a>
</li>
</ul>
<h3><a class="anchor" id="index_t"></a>- t -</h3><ul>
<h3><a id="index_t"></a>- t -</h3><ul>
<li>targetPosition()
: <a class="el" href="classAccelStepper.html#a96685e0945b7cf75d5959da679cd911e">AccelStepper</a>
</li>
</ul>
<h3><a id="index__7E"></a>- ~ -</h3><ul>
<li>~AccelStepper()
: <a class="el" href="classAccelStepper.html#a89c4c8de0c983e7a59de6a959481aff1">AccelStepper</a>
</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>

View File

@ -1,9 +1,10 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AccelStepper: Class Members - Functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
@ -25,48 +26,24 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li class="current"><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
<div id="navrow3" class="tabs2">
<ul class="tablist">
<li><a href="functions.html"><span>All</span></a></li>
<li class="current"><a href="functions_func.html"><span>Functions</span></a></li>
<li><a href="functions_vars.html"><span>Variables</span></a></li>
<li><a href="functions_enum.html"><span>Enumerations</span></a></li>
<li><a href="functions_eval.html"><span>Enumerator</span></a></li>
</ul>
</div>
<div id="navrow4" class="tabs3">
<ul class="tablist">
<li><a href="#index_a"><span>a</span></a></li>
<li><a href="#index_c"><span>c</span></a></li>
<li><a href="#index_d"><span>d</span></a></li>
<li><a href="#index_e"><span>e</span></a></li>
<li><a href="#index_i"><span>i</span></a></li>
<li><a href="#index_m"><span>m</span></a></li>
<li><a href="#index_r"><span>r</span></a></li>
<li><a href="#index_s"><span>s</span></a></li>
<li class="current"><a href="#index_t"><span>t</span></a></li>
</ul>
</div>
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="contents">
&#160;
<h3><a class="anchor" id="index_a"></a>- a -</h3><ul>
<h3><a id="index_a"></a>- a -</h3><ul>
<li>acceleration()
: <a class="el" href="classAccelStepper.html#a8b76f1ae6a49d2c2887b9fea30b8d84f">AccelStepper</a>
</li>
<li>AccelStepper()
: <a class="el" href="classAccelStepper.html#a3bc75bd6571b98a6177838ca81ac39ab">AccelStepper</a>
</li>
@ -76,9 +53,9 @@
</ul>
<h3><a class="anchor" id="index_c"></a>- c -</h3><ul>
<h3><a id="index_c"></a>- c -</h3><ul>
<li>computeNewSpeed()
: <a class="el" href="classAccelStepper.html#affbee789b5c19165846cf0409860ae79">AccelStepper</a>
: <a class="el" href="classAccelStepper.html#aab5944f43f869675958939c421bd9a01">AccelStepper</a>
</li>
<li>currentPosition()
: <a class="el" href="classAccelStepper.html#a5dce13ab2a1b02b8f443318886bf6fc5">AccelStepper</a>
@ -86,7 +63,7 @@
</ul>
<h3><a class="anchor" id="index_d"></a>- d -</h3><ul>
<h3><a id="index_d"></a>- d -</h3><ul>
<li>disableOutputs()
: <a class="el" href="classAccelStepper.html#a3591e29a236e2935afd7f64ff6c22006">AccelStepper</a>
</li>
@ -96,21 +73,21 @@
</ul>
<h3><a class="anchor" id="index_e"></a>- e -</h3><ul>
<h3><a id="index_e"></a>- e -</h3><ul>
<li>enableOutputs()
: <a class="el" href="classAccelStepper.html#aa279a50d30d0413f570c692cff071643">AccelStepper</a>
</li>
</ul>
<h3><a class="anchor" id="index_i"></a>- i -</h3><ul>
<h3><a id="index_i"></a>- i -</h3><ul>
<li>isRunning()
: <a class="el" href="classAccelStepper.html#a3a60cc0b962f8ceb81ee1e6f36443ceb">AccelStepper</a>
</li>
</ul>
<h3><a class="anchor" id="index_m"></a>- m -</h3><ul>
<h3><a id="index_m"></a>- m -</h3><ul>
<li>maxSpeed()
: <a class="el" href="classAccelStepper.html#a6123a1dfb4495d8bd2646288eae60d7f">AccelStepper</a>
</li>
@ -127,7 +104,7 @@
</ul>
<h3><a class="anchor" id="index_r"></a>- r -</h3><ul>
<h3><a id="index_r"></a>- r -</h3><ul>
<li>run()
: <a class="el" href="classAccelStepper.html#a608b2395b64ac15451d16d0371fe13ce">AccelStepper</a>
, <a class="el" href="classMultiStepper.html#a26c2f53b1e7ddf5d5dfb333f6fb7fb92">MultiStepper</a>
@ -148,7 +125,7 @@
</ul>
<h3><a class="anchor" id="index_s"></a>- s -</h3><ul>
<h3><a id="index_s"></a>- s -</h3><ul>
<li>setAcceleration()
: <a class="el" href="classAccelStepper.html#adfb19e3cd2a028a1fe78131787604fd1">AccelStepper</a>
</li>
@ -168,7 +145,7 @@
: <a class="el" href="classAccelStepper.html#af3c2516b6ce7c1ecbc2004107bb2a9ce">AccelStepper</a>
</li>
<li>setPinsInverted()
: <a class="el" href="classAccelStepper.html#a38298ac2dd852fb22259f6c4bbe08c94">AccelStepper</a>
: <a class="el" href="classAccelStepper.html#ac62cae590c2f9c303519a3a1c4adc8ab">AccelStepper</a>
</li>
<li>setSpeed()
: <a class="el" href="classAccelStepper.html#ae79c49ad69d5ccc9da0ee691fa4ca235">AccelStepper</a>
@ -200,23 +177,34 @@
<li>step8()
: <a class="el" href="classAccelStepper.html#aa909c6c3fcd3ea4b3ee1aa8b4d0f7e87">AccelStepper</a>
</li>
<li>stepBackward()
: <a class="el" href="classAccelStepper.html#af8abc9ede47286fa33b518e0bf297c6a">AccelStepper</a>
</li>
<li>stepForward()
: <a class="el" href="classAccelStepper.html#af4908b53e1821f0a6d2dab509257b3e6">AccelStepper</a>
</li>
<li>stop()
: <a class="el" href="classAccelStepper.html#a638817b85aed9d5cd15c76a76c00aced">AccelStepper</a>
</li>
</ul>
<h3><a class="anchor" id="index_t"></a>- t -</h3><ul>
<h3><a id="index_t"></a>- t -</h3><ul>
<li>targetPosition()
: <a class="el" href="classAccelStepper.html#a96685e0945b7cf75d5959da679cd911e">AccelStepper</a>
</li>
</ul>
<h3><a id="index__7E"></a>- ~ -</h3><ul>
<li>~AccelStepper()
: <a class="el" href="classAccelStepper.html#a89c4c8de0c983e7a59de6a959481aff1">AccelStepper</a>
</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>

View File

@ -1,9 +1,10 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AccelStepper: AccelStepper library for Arduino</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
@ -25,27 +26,28 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li class="current"><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
</ul>
</div>
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
<div class="PageDoc"><div class="header">
<div class="headertitle">
<div class="title"><a class="el" href="classAccelStepper.html" title="Support for stepper motors with acceleration etc. ">AccelStepper</a> library for Arduino </div> </div>
<div class="title"><a class="el" href="classAccelStepper.html" title="Support for stepper motors with acceleration etc.">AccelStepper</a> library for Arduino </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>This is the Arduino <a class="el" href="classAccelStepper.html" title="Support for stepper motors with acceleration etc. ">AccelStepper</a> library. It provides an object-oriented interface for 2, 3 or 4 pin stepper motors and motor drivers.</p>
<div class="textblock"><p>This is the Arduino <a class="el" href="classAccelStepper.html" title="Support for stepper motors with acceleration etc.">AccelStepper</a> library. It provides an object-oriented interface for 2, 3 or 4 pin stepper motors and motor drivers.</p>
<p>The standard Arduino IDE includes the Stepper library (<a href="http://arduino.cc/en/Reference/Stepper">http://arduino.cc/en/Reference/Stepper</a>) for stepper motors. It is perfectly adequate for simple, single motor applications.</p>
<p><a class="el" href="classAccelStepper.html" title="Support for stepper motors with acceleration etc. ">AccelStepper</a> significantly improves on the standard Arduino Stepper library in several ways: </p><ul>
<p><a class="el" href="classAccelStepper.html" title="Support for stepper motors with acceleration etc.">AccelStepper</a> significantly improves on the standard Arduino Stepper library in several ways: </p><ul>
<li>Supports acceleration and deceleration </li>
<li>Supports multiple simultaneous steppers, with independent concurrent stepping on each stepper </li>
<li>API functions never delay() or block </li>
<li>Most API functions never delay() or block (unless otherwise stated) </li>
<li>Supports 2, 3 and 4 wire steppers, plus 3 and 4 wire half steppers. </li>
<li>Supports alternate stepping functions to enable support of AFMotor (<a href="https://github.com/adafruit/Adafruit-Motor-Shield-library">https://github.com/adafruit/Adafruit-Motor-Shield-library</a>) </li>
<li>Supports stepper drivers such as the Sparkfun EasyDriver (based on 3967 driver chip) </li>
@ -53,29 +55,33 @@
<li>Extensive API </li>
<li>Subclass support</li>
</ul>
<p>The latest version of this documentation can be downloaded from <a href="http://www.airspayce.com/mikem/arduino/AccelStepper">http://www.airspayce.com/mikem/arduino/AccelStepper</a> The version of the package that this documentation refers to can be downloaded from <a href="http://www.airspayce.com/mikem/arduino/AccelStepper/AccelStepper-1.57.zip">http://www.airspayce.com/mikem/arduino/AccelStepper/AccelStepper-1.57.zip</a></p>
<p>The latest version of this documentation can be downloaded from <a href="http://www.airspayce.com/mikem/arduino/AccelStepper">http://www.airspayce.com/mikem/arduino/AccelStepper</a> The version of the package that this documentation refers to can be downloaded from <a href="http://www.airspayce.com/mikem/arduino/AccelStepper/AccelStepper-1.64.zip">http://www.airspayce.com/mikem/arduino/AccelStepper/AccelStepper-1.64.zip</a></p>
<p>Example Arduino programs are included to show the main modes of use.</p>
<p>You can also find online help and discussion at <a href="http://groups.google.com/group/accelstepper">http://groups.google.com/group/accelstepper</a> Please use that group for all questions and discussions on this topic. Do not contact the author directly, unless it is to discuss commercial licensing. Before asking a question or reporting a bug, please read</p><ul>
<li><a href="http://en.wikipedia.org/wiki/Wikipedia:Reference_desk/How_to_ask_a_software_question">http://en.wikipedia.org/wiki/Wikipedia:Reference_desk/How_to_ask_a_software_question</a></li>
<li><a href="http://www.catb.org/esr/faqs/smart-questions.html">http://www.catb.org/esr/faqs/smart-questions.html</a></li>
<li><a href="http://www.chiark.greenend.org.uk/~shgtatham/bugs.html">http://www.chiark.greenend.org.uk/~shgtatham/bugs.html</a></li>
</ul>
<p>Beginners to C++ and stepper motors in general may find this helpful:</p><ul>
<li><a href="https://hackaday.io/project/183279-accelstepper-the-missing-manual">https://hackaday.io/project/183279-accelstepper-the-missing-manual</a></li>
<li><a href="https://hackaday.io/project/183713-using-the-arduino-accelstepper-library">https://hackaday.io/project/183713-using-the-arduino-accelstepper-library</a></li>
</ul>
<p>Tested on Arduino Diecimila and Mega with arduino-0018 &amp; arduino-0021 on OpenSuSE 11.1 and avr-libc-1.6.1-1.15, cross-avr-binutils-2.19-9.1, cross-avr-gcc-4.1.3_20080612-26.5. Tested on Teensy <a href="http://www.pjrc.com/teensy">http://www.pjrc.com/teensy</a> including Teensy 3.1 built using Arduino IDE 1.0.5 with teensyduino addon 1.18 and later.</p>
<dl class="section user"><dt>Installation</dt><dd></dd></dl>
<p>Install in the usual way: unzip the distribution zip file to the libraries sub-folder of your sketchbook.</p>
<dl class="section user"><dt>Theory</dt><dd></dd></dl>
<p>This code uses speed calculations as described in "Generate stepper-motor speed profiles in real time" by David Austin <a href="http://fab.cba.mit.edu/classes/MIT/961.09/projects/i0/Stepper_Motor_Speed_Profile.pdf">http://fab.cba.mit.edu/classes/MIT/961.09/projects/i0/Stepper_Motor_Speed_Profile.pdf</a> or <a href="http://www.embedded.com/design/mcus-processors-and-socs/4006438/Generate-stepper-motor-speed-profiles-in-real-time">http://www.embedded.com/design/mcus-processors-and-socs/4006438/Generate-stepper-motor-speed-profiles-in-real-time</a> or <a href="http://web.archive.org/web/20140705143928/http://fab.cba.mit.edu/classes/MIT/961.09/projects/i0/Stepper_Motor_Speed_Profile.pdf">http://web.archive.org/web/20140705143928/http://fab.cba.mit.edu/classes/MIT/961.09/projects/i0/Stepper_Motor_Speed_Profile.pdf</a> with the exception that <a class="el" href="classAccelStepper.html" title="Support for stepper motors with acceleration etc. ">AccelStepper</a> uses steps per second rather than radians per second (because we dont know the step angle of the motor) An initial step interval is calculated for the first step, based on the desired acceleration On subsequent steps, shorter step intervals are calculated based on the previous step until max speed is achieved.</p>
<p>This code uses speed calculations as described in "Generate stepper-motor speed profiles in real time" by David Austin <a href="http://fab.cba.mit.edu/classes/MIT/961.09/projects/i0/Stepper_Motor_Speed_Profile.pdf">http://fab.cba.mit.edu/classes/MIT/961.09/projects/i0/Stepper_Motor_Speed_Profile.pdf</a> or <a href="http://www.embedded.com/design/mcus-processors-and-socs/4006438/Generate-stepper-motor-speed-profiles-in-real-time">http://www.embedded.com/design/mcus-processors-and-socs/4006438/Generate-stepper-motor-speed-profiles-in-real-time</a> or <a href="http://web.archive.org/web/20140705143928/http://fab.cba.mit.edu/classes/MIT/961.09/projects/i0/Stepper_Motor_Speed_Profile.pdf">http://web.archive.org/web/20140705143928/http://fab.cba.mit.edu/classes/MIT/961.09/projects/i0/Stepper_Motor_Speed_Profile.pdf</a> with the exception that <a class="el" href="classAccelStepper.html" title="Support for stepper motors with acceleration etc.">AccelStepper</a> uses steps per second rather than radians per second (because we dont know the step angle of the motor) An initial step interval is calculated for the first step, based on the desired acceleration On subsequent steps, shorter step intervals are calculated based on the previous step until max speed is achieved.</p>
<dl class="section user"><dt>Adafruit Motor Shield V2</dt><dd></dd></dl>
<p>The included examples AFMotor_* are for Adafruit Motor Shield V1 and do not work with Adafruit Motor Shield V2. See <a href="https://github.com/adafruit/Adafruit_Motor_Shield_V2_Library">https://github.com/adafruit/Adafruit_Motor_Shield_V2_Library</a> for examples that work with Adafruit Motor Shield V2.</p>
<dl class="section user"><dt>Donations</dt><dd></dd></dl>
<p>This library is offered under a free GPL license for those who want to use it that way. We try hard to keep it up to date, fix bugs and to provide free support. If this library has helped you save time or money, please consider donating at <a href="http://www.airspayce.com">http://www.airspayce.com</a> or here:</p>
<p> <form action="https://www.paypal.com/cgi-bin/webscr" method="post"><input type="hidden" name="cmd" value="_donations" /> <input type="hidden" name="business" value="mikem@airspayce.com" /> <input type="hidden" name="lc" value="AU" /> <input type="hidden" name="item_name" value="Airspayce" /> <input type="hidden" name="item_number" value="AccelStepper" /> <input type="hidden" name="currency_code" value="USD" /> <input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHosted" /> <input type="image" alt="PayPal — The safer, easier way to pay online." name="submit" src="https://www.paypalobjects.com/en_AU/i/btn/btn_donateCC_LG.gif" /> <img alt="" src="https://www.paypalobjects.com/en_AU/i/scr/pixel.gif" width="1" height="1" border="0" /></form> </p>
<dl class="section user"><dt>Trademarks</dt><dd></dd></dl>
<p><a class="el" href="classAccelStepper.html" title="Support for stepper motors with acceleration etc. ">AccelStepper</a> is a trademark of AirSpayce Pty Ltd. The <a class="el" href="classAccelStepper.html" title="Support for stepper motors with acceleration etc. ">AccelStepper</a> mark was first used on April 26 2010 for international trade, and is used only in relation to motor control hardware and software. It is not to be confused with any other similar marks covering other goods and services.</p>
<p><a class="el" href="classAccelStepper.html" title="Support for stepper motors with acceleration etc.">AccelStepper</a> is a trademark of AirSpayce Pty Ltd. The <a class="el" href="classAccelStepper.html" title="Support for stepper motors with acceleration etc.">AccelStepper</a> mark was first used on April 26 2010 for international trade, and is used only in relation to motor control hardware and software. It is not to be confused with any other similar marks covering other goods and services.</p>
<dl class="section user"><dt>Copyright</dt><dd></dd></dl>
<p>This software is Copyright (C) 2010 Mike McCauley. Use is subject to license conditions. The main licensing options available are GPL V2 or Commercial:</p>
<dl class="section user"><dt>Open Source Licensing GPL V2</dt><dd>This is the appropriate option if you want to share the source code of your application with everyone you distribute it to, and you also want to give them the right to share who uses it. If you wish to use this software under Open Source Licensing, you must contribute all your source code to the open source community in accordance with the GPL Version 2 when your application is distributed. See <a href="https://www.gnu.org/licenses/gpl-2.0.html">https://www.gnu.org/licenses/gpl-2.0.html</a></dd></dl>
<dl class="section user"><dt>Commercial Licensing</dt><dd>This is the appropriate option if you are creating proprietary applications and you are not prepared to distribute and share the source code of your application. Purchase commercial licenses at <a href="http://airspayce.binpress.com/">http://airspayce.binpress.com/</a></dd></dl>
<p>This software is Copyright (C) 2010-2021 Mike McCauley. Use is subject to license conditions. The main licensing options available are GPL V3 or Commercial:</p>
<dl class="section user"><dt>Open Source Licensing GPL V3</dt><dd>This is the appropriate option if you want to share the source code of your application with everyone you distribute it to, and you also want to give them the right to share who uses it. If you wish to use this software under Open Source Licensing, you must contribute all your source code to the open source community in accordance with the GPL Version 23 when your application is distributed. See <a href="https://www.gnu.org/licenses/gpl-3.0.html">https://www.gnu.org/licenses/gpl-3.0.html</a></dd></dl>
<dl class="section user"><dt>Commercial Licensing</dt><dd>This is the appropriate option if you are creating proprietary applications and you are not prepared to distribute and share the source code of your application. To purchase a commercial license, contact <a href="#" onclick="location.href='mai'+'lto:'+'inf'+'o@'+'air'+'sp'+'ayc'+'e.'+'com'; return false;">info@<span style="display: none;">.nosp@m.</span>airs<span style="display: none;">.nosp@m.</span>payce<span style="display: none;">.nosp@m.</span>.com</a></dd></dl>
<dl class="section user"><dt>Revision History</dt><dd></dd></dl>
<dl class="section version"><dt>Version</dt><dd>1.0 Initial release</dd>
<dd>
@ -117,7 +123,7 @@
<dd>
1.19 Added MotorInterfaceType and symbolic names for the number of pins to use for the motor interface. Updated examples to suit. Replaced individual pin assignment variables _pin1, _pin2 etc with array _pin[4]. _pins member changed to _interface. Added _pinInverted array to simplify pin inversion operations. Added new function setOutputPins() which sets the motor output pins. It can be overridden in order to provide, say, serial output instead of parallel output Some refactoring and code size reduction. </dd>
<dd>
1.20 Improved documentation and examples to show need for correctly specifying <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5adedd394a375190a3df8d4519c0d4dc2f" title="4 wire full stepper, 4 motor pins required ">AccelStepper::FULL4WIRE</a> and friends. </dd>
1.20 Improved documentation and examples to show need for correctly specifying <a class="el" href="classAccelStepper.html#a73bdecf1273d98d8c5fbcb764cabeea5adedd394a375190a3df8d4519c0d4dc2f" title="4 wire full stepper, 4 motor pins required">AccelStepper::FULL4WIRE</a> and friends. </dd>
<dd>
1.21 Fixed a problem where desiredSpeed could compute the wrong step acceleration when _speed was small but non-zero. Reported by Brian Schmalz. Precompute sqrt_twoa to improve performance and max possible stepping speed </dd>
<dd>
@ -133,7 +139,7 @@
<dd>
1.27 Added stop() function to stop as fast as possible with current acceleration parameters. Also added new Quickstop example showing its use. </dd>
<dd>
1.28 Fixed another problem where certain combinations of speed and accelration could cause oscillation about the target position. Added support for 3 wire full and half steppers such as Hard Disk Drive spindle. Contributed by Yuri Ivatchkovitch. </dd>
1.28 Fixed another problem where certain combinations of speed and acceleration could cause oscillation about the target position. Added support for 3 wire full and half steppers such as Hard Disk Drive spindle. Contributed by Yuri Ivatchkovitch. </dd>
<dd>
1.29 Fixed a problem that could cause a DRIVER stepper to continually step with some sketches. Reported by Vadim. </dd>
<dd>
@ -164,7 +170,7 @@
1.42 Improved support for FULL3WIRE and HALF3WIRE output pins. These changes were in Yuri's original contribution but did not make it into production.<br />
</dd>
<dd>
1.43 Added DualMotorShield example. Shows how to use <a class="el" href="classAccelStepper.html" title="Support for stepper motors with acceleration etc. ">AccelStepper</a> to control 2 x 2 phase steppers using the Itead Studio Arduino Dual Stepper Motor Driver Shield model IM120417015.<br />
1.43 Added DualMotorShield example. Shows how to use <a class="el" href="classAccelStepper.html" title="Support for stepper motors with acceleration etc.">AccelStepper</a> to control 2 x 2 phase steppers using the Itead Studio Arduino Dual Stepper Motor Driver Shield model IM120417015.<br />
</dd>
<dd>
1.44 examples/DualMotorShield/DualMotorShield.ino examples/DualMotorShield/DualMotorShield.pde was missing from the distribution.<br />
@ -180,8 +186,8 @@
1.46 Fixed error in documentation for runToPosition(). Reinstated time calculations in runSpeed() since new version is reported not to work correctly under some circumstances. Reported by Oleg V Gavva.<br />
</dd>
<dd>
1.48 2015-08-25 Added new class <a class="el" href="classMultiStepper.html" title="Operate multiple AccelSteppers in a co-ordinated fashion. ">MultiStepper</a> that can manage multiple AccelSteppers, and cause them all to move to selected positions at such a (constant) speed that they all arrive at their target position at the same time. Suitable for X-Y flatbeds etc.<br />
Added new method maxSpeed() to <a class="el" href="classAccelStepper.html" title="Support for stepper motors with acceleration etc. ">AccelStepper</a> to return the currently configured maxSpeed.<br />
1.48 2015-08-25 Added new class <a class="el" href="classMultiStepper.html" title="Operate multiple AccelSteppers in a co-ordinated fashion.">MultiStepper</a> that can manage multiple AccelSteppers, and cause them all to move to selected positions at such a (constant) speed that they all arrive at their target position at the same time. Suitable for X-Y flatbeds etc.<br />
Added new method maxSpeed() to <a class="el" href="classAccelStepper.html" title="Support for stepper motors with acceleration etc.">AccelStepper</a> to return the currently configured maxSpeed.<br />
</dd>
<dd>
1.49 2016-01-02 Testing with VID28 series instrument stepper motors and EasyDriver. OK, although with light pointers and slow speeds like 180 full steps per second the motor movement can be erratic, probably due to some mechanical resonance. Best to accelerate through this speed.<br />
@ -194,7 +200,7 @@
<dd>
1.51 2016-03-24 Fixed a problem reported by gregor: when resetting the stepper motor position using setCurrentPosition() the stepper speed is reset by setting _stepInterval to 0, but _speed is not reset. this results in the stepper motor not starting again when calling setSpeed() with the same speed the stepper was set to before. </dd>
<dd>
1.52 2016-08-09 Added <a class="el" href="classMultiStepper.html" title="Operate multiple AccelSteppers in a co-ordinated fashion. ">MultiStepper</a> to keywords.txt. Improvements to efficiency of <a class="el" href="classAccelStepper.html#aa4a6bdf99f698284faaeb5542b0b7514">AccelStepper::runSpeed()</a> as suggested by David Grayson. Improvements to speed accuracy as suggested by David Grayson. </dd>
1.52 2016-08-09 Added <a class="el" href="classMultiStepper.html" title="Operate multiple AccelSteppers in a co-ordinated fashion.">MultiStepper</a> to keywords.txt. Improvements to efficiency of <a class="el" href="classAccelStepper.html#aa4a6bdf99f698284faaeb5542b0b7514">AccelStepper::runSpeed()</a> as suggested by David Grayson. Improvements to speed accuracy as suggested by David Grayson. </dd>
<dd>
1.53 2016-08-14 Backed out Improvements to speed accuracy from 1.52 as it did not work correctly. </dd>
<dd>
@ -204,14 +210,30 @@
<dd>
1.56 2017-02-03 Fixed minor documentation error with DIRECTION_CCW and DIRECTION_CW. Reported by David Mutterer. Added link to Binpress commercial license purchasing. </dd>
<dd>
1.57 2017-03-28 _direction moved to protected at the request of Rudy Ercek. setMaxSpeed() and setAcceleration() now correct negative values to be positive.</dd></dl>
<dl class="section author"><dt>Author</dt><dd>Mike McCauley (<a href="#" onclick="location.href='mai'+'lto:'+'mik'+'em'+'@ai'+'rs'+'pay'+'ce'+'.co'+'m'; return false;">mikem<span style="display: none;">.nosp@m.</span>@air<span style="display: none;">.nosp@m.</span>spayc<span style="display: none;">.nosp@m.</span>e.co<span style="display: none;">.nosp@m.</span>m</a>) DO NOT CONTACT THE AUTHOR DIRECTLY: USE THE LISTS </dd></dl>
</div></div><!-- contents -->
1.57 2017-03-28 _direction moved to protected at the request of Rudy Ercek. setMaxSpeed() and setAcceleration() now correct negative values to be positive. </dd>
<dd>
1.58 2018-04-13 Add initialisation for _enableInverted in constructor. </dd>
<dd>
1.59 2018-08-28 Update commercial licensing, remove binpress. </dd>
<dd>
1.60 2020-03-07 Release under GPL V3 </dd>
<dd>
1.61 2020-04-20 Added yield() call in runToPosition(), so that platforms like esp8266 dont hang/crash during long runs. </dd>
<dd>
1.62 2022-05-22 Added link to <a class="el" href="classAccelStepper.html" title="Support for stepper motors with acceleration etc.">AccelStepper</a> - The Missing Manual.<br />
Fixed a problem when setting the maxSpeed to 1.0 due to incomplete initialisation. Reported by Olivier Pécheux. <br />
</dd>
<dd>
1.63 2022-06-30 Added virtual destructor at the request of Jan.<br />
</dd>
<dd>
1.64 2022-10-31 Patch courtesy acwest: Changes to make <a class="el" href="classAccelStepper.html" title="Support for stepper motors with acceleration etc.">AccelStepper</a> more subclassable. These changes are largely oriented to implementing new step-scheduling algorithms.</dd></dl>
<dl class="section author"><dt>Author</dt><dd>Mike McCauley (<a href="#" onclick="location.href='mai'+'lto:'+'mik'+'em'+'@ai'+'rs'+'pay'+'ce'+'.co'+'m'; return false;">mikem<span style="display: none;">.nosp@m.</span>@air<span style="display: none;">.nosp@m.</span>spayc<span style="display: none;">.nosp@m.</span>e.co<span style="display: none;">.nosp@m.</span>m</a>) DO NOT CONTACT THE AUTHOR DIRECTLY: USE THE GOOGLE GROUP </dd></dl>
</div></div><!-- PageDoc -->
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@ -35,6 +35,7 @@ setMinPulseWidth KEYWORD2
setEnablePin KEYWORD2
setPinsInverted KEYWORD2
maxSpeed KEYWORD2
isRunning KEYWORD2
#######################################
# Constants (LITERAL1)
#######################################

View File

@ -1,5 +1,5 @@
name=AccelStepper
version=1.57.1
version=1.64
author=Mike McCauley <mikem@airspayce.com>
maintainer=Patrick Wasp <patrickwasp@gmail.com>
sentence=Allows Arduino boards to control a variety of stepper motors.

View File

@ -1,7 +1,7 @@
// AccelStepper.cpp
//
// Copyright (C) 2009-2013 Mike McCauley
// $Id: AccelStepper.cpp,v 1.23 2016/08/09 00:39:10 mikem Exp $
// Copyright (C) 2009-2020 Mike McCauley
// $Id: AccelStepper.cpp,v 1.24 2020/04/20 00:15:03 mikem Exp mikem $
#include "AccelStepper.h"
@ -94,7 +94,8 @@ void AccelStepper::setCurrentPosition(long position)
_speed = 0.0;
}
void AccelStepper::computeNewSpeed()
// Subclasses can override
unsigned long AccelStepper::computeNewSpeed()
{
long distanceTo = distanceToGo(); // +ve is clockwise from curent location
@ -106,7 +107,7 @@ void AccelStepper::computeNewSpeed()
_stepInterval = 0;
_speed = 0.0;
_n = 0;
return;
return _stepInterval;
}
if (distanceTo > 0)
@ -174,6 +175,7 @@ void AccelStepper::computeNewSpeed()
Serial.println(stepsToStop);
Serial.println("-----");
#endif
return _stepInterval;
}
// Run the motor to implement speed and acceleration in order to proceed to the target position
@ -193,7 +195,7 @@ AccelStepper::AccelStepper(uint8_t interface, uint8_t pin1, uint8_t pin2, uint8_
_currentPos = 0;
_targetPos = 0;
_speed = 0.0;
_maxSpeed = 1.0;
_maxSpeed = 0.0;
_acceleration = 0.0;
_sqrt_twoa = 1.0;
_stepInterval = 0;
@ -204,6 +206,7 @@ AccelStepper::AccelStepper(uint8_t interface, uint8_t pin1, uint8_t pin2, uint8_
_pin[1] = pin2;
_pin[2] = pin3;
_pin[3] = pin4;
_enableInverted = false;
// NEW
_n = 0;
@ -219,6 +222,7 @@ AccelStepper::AccelStepper(uint8_t interface, uint8_t pin1, uint8_t pin2, uint8_
enableOutputs();
// Some reasonable default
setAcceleration(1);
setMaxSpeed(1);
}
AccelStepper::AccelStepper(void (*forward)(), void (*backward)())
@ -227,7 +231,7 @@ AccelStepper::AccelStepper(void (*forward)(), void (*backward)())
_currentPos = 0;
_targetPos = 0;
_speed = 0.0;
_maxSpeed = 1.0;
_maxSpeed = 0.0;
_acceleration = 0.0;
_sqrt_twoa = 1.0;
_stepInterval = 0;
@ -253,6 +257,7 @@ AccelStepper::AccelStepper(void (*forward)(), void (*backward)())
_pinInverted[i] = 0;
// Some reasonable default
setAcceleration(1);
setMaxSpeed(1);
}
void AccelStepper::setMaxSpeed(float speed)
@ -294,6 +299,11 @@ void AccelStepper::setAcceleration(float acceleration)
}
}
float AccelStepper::acceleration()
{
return _acceleration;
}
void AccelStepper::setSpeed(float speed)
{
if (speed == _speed)
@ -349,6 +359,24 @@ void AccelStepper::step(long step)
}
}
long AccelStepper::stepForward()
{
// Clockwise
_currentPos += 1;
step(_currentPos);
_lastStepTime = micros();
return _currentPos;
}
long AccelStepper::stepBackward()
{
// Counter-clockwise
_currentPos -= 1;
step(_currentPos);
_lastStepTime = micros();
return _currentPos;
}
// You might want to override this to implement eg serial output
// bit 0 of the mask corresponds to _pin[0]
// bit 1 of the mask corresponds to _pin[1]
@ -612,7 +640,7 @@ void AccelStepper::setPinsInverted(bool pin1Invert, bool pin2Invert, bool pin3In
void AccelStepper::runToPosition()
{
while (run())
;
YIELD; // Let system housekeeping occur
}
boolean AccelStepper::runSpeedToPosition()

View File

@ -12,7 +12,7 @@
/// AccelStepper significantly improves on the standard Arduino Stepper library in several ways:
/// \li Supports acceleration and deceleration
/// \li Supports multiple simultaneous steppers, with independent concurrent stepping on each stepper
/// \li API functions never delay() or block
/// \li Most API functions never delay() or block (unless otherwise stated)
/// \li Supports 2, 3 and 4 wire steppers, plus 3 and 4 wire half steppers.
/// \li Supports alternate stepping functions to enable support of AFMotor (https://github.com/adafruit/Adafruit-Motor-Shield-library)
/// \li Supports stepper drivers such as the Sparkfun EasyDriver (based on 3967 driver chip)
@ -23,7 +23,7 @@
/// The latest version of this documentation can be downloaded from
/// http://www.airspayce.com/mikem/arduino/AccelStepper
/// The version of the package that this documentation refers to can be downloaded
/// from http://www.airspayce.com/mikem/arduino/AccelStepper/AccelStepper-1.57.zip
/// from http://www.airspayce.com/mikem/arduino/AccelStepper/AccelStepper-1.64.zip
///
/// Example Arduino programs are included to show the main modes of use.
///
@ -35,6 +35,10 @@
/// - http://www.catb.org/esr/faqs/smart-questions.html
/// - http://www.chiark.greenend.org.uk/~shgtatham/bugs.html
///
/// Beginners to C++ and stepper motors in general may find this helpful:
/// - https://hackaday.io/project/183279-accelstepper-the-missing-manual
/// - https://hackaday.io/project/183713-using-the-arduino-accelstepper-library
///
/// Tested on Arduino Diecimila and Mega with arduino-0018 & arduino-0021
/// on OpenSuSE 11.1 and avr-libc-1.6.1-1.15,
/// cross-avr-binutils-2.19-9.1, cross-avr-gcc-4.1.3_20080612-26.5.
@ -81,21 +85,21 @@
///
/// \par Copyright
///
/// This software is Copyright (C) 2010 Mike McCauley. Use is subject to license
/// conditions. The main licensing options available are GPL V2 or Commercial:
/// This software is Copyright (C) 2010-2021 Mike McCauley. Use is subject to license
/// conditions. The main licensing options available are GPL V3 or Commercial:
///
/// \par Open Source Licensing GPL V2
/// \par Open Source Licensing GPL V3
/// This is the appropriate option if you want to share the source code of your
/// application with everyone you distribute it to, and you also want to give them
/// the right to share who uses it. If you wish to use this software under Open
/// Source Licensing, you must contribute all your source code to the open source
/// community in accordance with the GPL Version 2 when your application is
/// distributed. See https://www.gnu.org/licenses/gpl-2.0.html
/// community in accordance with the GPL Version 23 when your application is
/// distributed. See https://www.gnu.org/licenses/gpl-3.0.html
///
/// \par Commercial Licensing
/// This is the appropriate option if you are creating proprietary applications
/// and you are not prepared to distribute and share the source code of your
/// application. Purchase commercial licenses at http://airspayce.binpress.com/
/// application. To purchase a commercial license, contact info@airspayce.com
///
/// \par Revision History
/// \version 1.0 Initial release
@ -158,7 +162,7 @@
/// oscillation about the target position.
/// \version 1.27 Added stop() function to stop as fast as possible with current acceleration parameters.
/// Also added new Quickstop example showing its use.
/// \version 1.28 Fixed another problem where certain combinations of speed and accelration could cause
/// \version 1.28 Fixed another problem where certain combinations of speed and acceleration could cause
/// oscillation about the target position.
/// Added support for 3 wire full and half steppers such as Hard Disk Drive spindle.
/// Contributed by Yuri Ivatchkovitch.
@ -240,10 +244,28 @@
/// \version 1.57 2017-03-28
/// _direction moved to protected at the request of Rudy Ercek.
/// setMaxSpeed() and setAcceleration() now correct negative values to be positive.
/// \version 1.58 2018-04-13
/// Add initialisation for _enableInverted in constructor.
/// \version 1.59 2018-08-28
/// Update commercial licensing, remove binpress.
/// \version 1.60 2020-03-07
/// Release under GPL V3
/// \version 1.61 2020-04-20
/// Added yield() call in runToPosition(), so that platforms like esp8266 dont hang/crash
/// during long runs.
/// \version 1.62 2022-05-22
/// Added link to AccelStepper - The Missing Manual.<br>
/// Fixed a problem when setting the maxSpeed to 1.0 due to incomplete initialisation.
/// Reported by Olivier Pécheux. <br>
/// \version 1.63 2022-06-30
/// Added virtual destructor at the request of Jan.<br>
/// \version 1.64 2022-10-31
/// Patch courtesy acwest: Changes to make AccelStepper more subclassable. These changes are
/// largely oriented to implementing new step-scheduling algorithms.
///
/// \author Mike McCauley (mikem@airspayce.com) DO NOT CONTACT THE AUTHOR DIRECTLY: USE THE LISTS
// Copyright (C) 2009-2013 Mike McCauley
// $Id: AccelStepper.h,v 1.27 2016/08/14 10:26:54 mikem Exp mikem $
/// \author Mike McCauley (mikem@airspayce.com) DO NOT CONTACT THE AUTHOR DIRECTLY: USE THE GOOGLE GROUP
// Copyright (C) 2009-2020 Mike McCauley
// $Id: AccelStepper.h,v 1.28 2020/04/20 00:15:03 mikem Exp mikem $
#ifndef AccelStepper_h
#define AccelStepper_h
@ -259,6 +281,14 @@
// These defs cause trouble on some versions of Arduino
#undef round
// Use the system yield() whenever possoible, since some platforms require it for housekeeping, especially
// ESP8266
#if (defined(ARDUINO) && ARDUINO >= 155) || defined(ESP8266)
#define YIELD yield();
#else
#define YIELD
#endif
/////////////////////////////////////////////////////////////////////
/// \class AccelStepper AccelStepper.h <AccelStepper.h>
/// \brief Support for stepper motors with acceleration etc.
@ -333,6 +363,8 @@ public:
/// AccelStepper::DRIVER (1) means a stepper driver (with Step and Direction pins).
/// If an enable line is also needed, call setEnablePin() after construction.
/// You may also invert the pins using setPinsInverted().
/// Caution: DRIVER implements a blocking delay of minPulseWidth microseconds (default 1us) for each step.
/// You can change this with setMinPulseWidth().
/// AccelStepper::FULL2WIRE (2) means a 2 wire stepper (2 pins required).
/// AccelStepper::FULL3WIRE (3) means a 3 wire stepper, such as HDD spindle (3 pins required).
/// AccelStepper::FULL4WIRE (4) means a 4 wire stepper (4 pins required).
@ -371,13 +403,13 @@ public:
/// anticlockwise from the 0 position.
void moveTo(long absolute);
/// Set the target position relative to the current position
/// Set the target position relative to the current position.
/// \param[in] relative The desired position relative to the current position. Negative is
/// anticlockwise from the current position.
void move(long relative);
/// Poll the motor and step it if a step is due, implementing
/// accelerations and decelerations to acheive the target position. You must call this as
/// accelerations and decelerations to achieve the target position. You must call this as
/// frequently as possible, but at least once per minimum step time interval,
/// preferably in your main loop. Note that each call to run() will make at most one step, and then only when a step is due,
/// based on the current speed and the time since the last step.
@ -393,12 +425,13 @@ public:
/// Sets the maximum permitted speed. The run() function will accelerate
/// up to the speed set by this function.
/// Caution: the maximum speed achievable depends on your processor and clock speed.
/// The default maxSpeed is 1.0 steps per second.
/// \param[in] speed The desired maximum speed in steps per second. Must
/// be > 0. Caution: Speeds that exceed the maximum speed supported by the processor may
/// Result in non-linear accelerations and decelerations.
void setMaxSpeed(float speed);
/// returns the maximum speed configured for this stepper
/// Returns the maximum speed configured for this stepper
/// that was previously set by setMaxSpeed();
/// \return The currently configured maximum speed
float maxSpeed();
@ -409,15 +442,21 @@ public:
/// root to be calculated. Dont call more ofthen than needed
void setAcceleration(float acceleration);
/// Returns the acceleration/deceleration rate configured for this stepper
/// that was previously set by setAcceleration();
/// \return The currently configured acceleration/deceleration
float acceleration();
/// Sets the desired constant speed for use with runSpeed().
/// \param[in] speed The desired constant speed in steps per
/// second. Positive is clockwise. Speeds of more than 1000 steps per
/// second are unreliable. Very slow speeds may be set (eg 0.00027777 for
/// once per hour, approximately. Speed accuracy depends on the Arduino
/// crystal. Jitter depends on how frequently you call the runSpeed() function.
/// The speed will be limited by the current value of setMaxSpeed()
void setSpeed(float speed);
/// The most recently set speed
/// The most recently set speed.
/// \return the most recent speed in steps per second
float speed();
@ -431,7 +470,7 @@ public:
/// in steps. Positive is clockwise from the 0 position.
long targetPosition();
/// The currently motor position.
/// The current motor position.
/// \return the current motor position
/// in steps. Positive is clockwise from the 0 position.
long currentPosition();
@ -450,7 +489,10 @@ public:
/// position. Dont use this in event loops, since it blocks.
void runToPosition();
/// Runs at the currently selected speed until the target position is reached
/// Executes runSpeed() unless the targetPosition is reached.
/// This function needs to be called often just like runSpeed() or run().
/// Will step the motor if a step is required at the currently selected
/// speed unless the target position has been reached.
/// Does not implement accelerations.
/// \return true if it stepped
boolean runSpeedToPosition();
@ -512,6 +554,8 @@ public:
/// \return true if the speed is not zero or not at the target position
bool isRunning();
/// Virtual destructor to prevent warnings during delete
virtual ~AccelStepper() {};
protected:
/// \brief Direction indicator
@ -530,7 +574,8 @@ protected:
/// \li after change to acceleration through setAcceleration()
/// \li after change to target position (relative or absolute) through
/// move() or moveTo()
void computeNewSpeed();
/// \return the new step interval
virtual unsigned long computeNewSpeed();
/// Low level function to set the motor output pins
/// bit 0 of the mask corresponds to _pin[0]
@ -546,6 +591,16 @@ protected:
/// \param[in] step The current step phase number (0 to 7)
virtual void step(long step);
/// Called to execute a clockwise(+) step. Only called when a new step is
/// required. This increments the _currentPos and calls step()
/// \return the updated current position
long stepForward();
/// Called to execute a counter-clockwise(-) step. Only called when a new step is
/// required. This decrements the _currentPos and calls step()
/// \return the updated current position
long stepBackward();
/// Called to execute a step using stepper functions (pins = 0) Only called when a new step is
/// required. Calls _forward() or _backward() to perform the step
/// \param[in] step The current step phase number (0 to 7)
@ -586,7 +641,7 @@ protected:
/// \param[in] step The current step phase number (0 to 7)
virtual void step6(long step);
/// Called to execute a step on a 4 pin half-steper motor. Only called when a new step is
/// Called to execute a step on a 4 pin half-stepper motor. Only called when a new step is
/// required. Subclasses may override to implement new stepping
/// interfaces. The default sets or clears the outputs of pin1, pin2,
/// pin3, pin4.
@ -597,6 +652,10 @@ protected:
/// Protected because some peoples subclasses need it to be so
boolean _direction; // 1 == CW
/// The current interval between steps in microseconds.
/// 0 means the motor is currently stopped with _speed == 0
unsigned long _stepInterval;
private:
/// Number of pins on the stepper motor. Permits 2 or 4. 2 pins is a
/// bipolar, and 4 pins is a unipolar.
@ -629,10 +688,6 @@ private:
float _acceleration;
float _sqrt_twoa; // Precomputed sqrt(2*_acceleration)
/// The current interval between steps in microseconds.
/// 0 means the motor is currently stopped with _speed == 0
unsigned long _stepInterval;
/// The last step time in microseconds
unsigned long _lastStepTime;

View File

@ -1,7 +1,7 @@
// MultiStepper.cpp
//
// Copyright (C) 2015 Mike McCauley
// $Id: MultiStepper.cpp,v 1.2 2015/10/04 05:16:38 mikem Exp $
// $Id: MultiStepper.cpp,v 1.3 2020/04/20 00:15:03 mikem Exp mikem $
#include "MultiStepper.h"
#include "AccelStepper.h"
@ -60,6 +60,19 @@ boolean MultiStepper::run()
_steppers[i]->runSpeed();
ret = true;
}
// Caution: it has een reported that if any motor is used with acceleration outside of
// MultiStepper, this code is necessary, you get
// strange results where it moves in the wrong direction for a while then
// slams back the correct way.
#if 0
else
{
// Need to call this to clear _stepInterval, _speed and _n
otherwise future calls will fail.
_steppers[i]->setCurrentPosition(_steppers[i]->currentPosition());
}
#endif
}
return ret;
}