root / trunk / docs / libdragonfly / group__motors.html @ 1145
History | View | Annotate | Download (9.92 KB)
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
---|---|
2 |
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
3 |
<title>libdragonfly: Motors</title> |
4 |
<link href="doxygen.css" rel="stylesheet" type="text/css"> |
5 |
<link href="tabs.css" rel="stylesheet" type="text/css"> |
6 |
</head><body> |
7 |
<!-- Generated by Doxygen 1.5.5 -->
|
8 |
<div class="navigation" id="top"> |
9 |
<div class="tabs"> |
10 |
<ul>
|
11 |
<li><a href="index.html"><span>Main Page</span></a></li> |
12 |
<li><a href="pages.html"><span>Related Pages</span></a></li> |
13 |
<li><a href="modules.html"><span>Modules</span></a></li> |
14 |
<li><a href="annotated.html"><span>Data Structures</span></a></li> |
15 |
<li><a href="files.html"><span>Files</span></a></li> |
16 |
</ul>
|
17 |
</div>
|
18 |
</div>
|
19 |
<div class="contents"> |
20 |
<h1>Motors</h1>Functions for controlling the motors. Functions for controlling the motors. Found in <a class="el" href="motor_8h.html" title="Contains definitions for controlling the motors.">motor.h</a>. |
21 |
<a href="#_details">More...</a><table border="0" cellpadding="0" cellspacing="0"> |
22 |
<tr><td></td></tr> |
23 |
<tr><td colspan="2"><br><h2>Defines</h2></td></tr> |
24 |
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g6ddfdda7a062d10cff4a72b76b44aeb8"></a><!-- doxytag: member="motors::FORWARD" ref="g6ddfdda7a062d10cff4a72b76b44aeb8" args="" --> |
25 |
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__motors.html#g6ddfdda7a062d10cff4a72b76b44aeb8">FORWARD</a> 1</td></tr> |
26 |
|
27 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">make the motors go forwards <br></td></tr> |
28 |
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gdf445abfe1b77fa63f89e315ccc2f7f2"></a><!-- doxytag: member="motors::BACKWARD" ref="gdf445abfe1b77fa63f89e315ccc2f7f2" args="" --> |
29 |
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__motors.html#gdf445abfe1b77fa63f89e315ccc2f7f2">BACKWARD</a> 0</td></tr> |
30 |
|
31 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">make the motors go backwards <br></td></tr> |
32 |
<tr><td colspan="2"><br><h2>Functions</h2></td></tr> |
33 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__motors.html#gbad32bfc46c9f31ba81955775611bd21">motors_init</a> (void)</td></tr> |
34 |
|
35 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Initialize the motors. <a href="#gbad32bfc46c9f31ba81955775611bd21"></a><br></td></tr> |
36 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__motors.html#g751a431c19cdb52bbbc8127455bd41ee">motor1_set</a> (int direction, int speed)</td></tr> |
37 |
|
38 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set speed and direction of motor1. <a href="#g751a431c19cdb52bbbc8127455bd41ee"></a><br></td></tr> |
39 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__motors.html#g23940fd8408c23fcf312b1d5937f0ab0">motor2_set</a> (int direction, int speed)</td></tr> |
40 |
|
41 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set speed and direction of motor2. <a href="#g23940fd8408c23fcf312b1d5937f0ab0"></a><br></td></tr> |
42 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__motors.html#g3c7ada13bc7d8ed5e819910da74bf9cd">motors_off</a> (void)</td></tr> |
43 |
|
44 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Turn the motors off. <a href="#g3c7ada13bc7d8ed5e819910da74bf9cd"></a><br></td></tr> |
45 |
</table>
|
46 |
<hr><a name="_details"></a><h2>Detailed Description</h2> |
47 |
Functions for controlling the motors. Functions for controlling the motors. Found in <a class="el" href="motor_8h.html" title="Contains definitions for controlling the motors.">motor.h</a>. |
48 |
<p>
|
49 |
<hr><h2>Function Documentation</h2> |
50 |
<a class="anchor" name="g751a431c19cdb52bbbc8127455bd41ee"></a><!-- doxytag: member="motor.c::motor1_set" ref="g751a431c19cdb52bbbc8127455bd41ee" args="(int direction, int speed)" --> |
51 |
<div class="memitem"> |
52 |
<div class="memproto"> |
53 |
<table class="memname"> |
54 |
<tr>
|
55 |
<td class="memname">void motor1_set </td> |
56 |
<td>(</td> |
57 |
<td class="paramtype">int </td> |
58 |
<td class="paramname"> <em>direction</em>, </td> |
59 |
</tr>
|
60 |
<tr>
|
61 |
<td class="paramkey"></td> |
62 |
<td></td> |
63 |
<td class="paramtype">int </td> |
64 |
<td class="paramname"> <em>speed</em></td><td> </td> |
65 |
</tr>
|
66 |
<tr>
|
67 |
<td></td> |
68 |
<td>)</td> |
69 |
<td></td><td></td><td width="100%"></td> |
70 |
</tr>
|
71 |
</table>
|
72 |
</div>
|
73 |
<div class="memdoc"> |
74 |
|
75 |
<p>
|
76 |
Set speed and direction of motor1. |
77 |
<p>
|
78 |
Sets the speed and direction of motor1. motors_init must be called before this function can be used.<p>
|
79 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
80 |
<table border="0" cellspacing="2" cellpadding="0"> |
81 |
<tr><td valign="top"></td><td valign="top"><em>direction</em> </td><td>Either FORWARD or BACKWARD to set the direction of rotation. </td></tr> |
82 |
<tr><td valign="top"></td><td valign="top"><em>speed</em> </td><td>The speed the motor will run at, in the range 0-255.</td></tr> |
83 |
</table>
|
84 |
</dl>
|
85 |
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__motors.html#g23940fd8408c23fcf312b1d5937f0ab0" title="Set speed and direction of motor2.">motor2_set</a>, <a class="el" href="group__motors.html#gbad32bfc46c9f31ba81955775611bd21" title="Initialize the motors.">motors_init</a> </dd></dl> |
86 |
|
87 |
<p>Referenced by <a class="el" href="move_8c-source.html#l00070">move()</a>, and <a class="el" href="move_8c-source.html#l00107">move_avoid()</a>.</p> |
88 |
|
89 |
</div>
|
90 |
</div><p> |
91 |
<a class="anchor" name="g23940fd8408c23fcf312b1d5937f0ab0"></a><!-- doxytag: member="motor.c::motor2_set" ref="g23940fd8408c23fcf312b1d5937f0ab0" args="(int direction, int speed)" --> |
92 |
<div class="memitem"> |
93 |
<div class="memproto"> |
94 |
<table class="memname"> |
95 |
<tr>
|
96 |
<td class="memname">void motor2_set </td> |
97 |
<td>(</td> |
98 |
<td class="paramtype">int </td> |
99 |
<td class="paramname"> <em>direction</em>, </td> |
100 |
</tr>
|
101 |
<tr>
|
102 |
<td class="paramkey"></td> |
103 |
<td></td> |
104 |
<td class="paramtype">int </td> |
105 |
<td class="paramname"> <em>speed</em></td><td> </td> |
106 |
</tr>
|
107 |
<tr>
|
108 |
<td></td> |
109 |
<td>)</td> |
110 |
<td></td><td></td><td width="100%"></td> |
111 |
</tr>
|
112 |
</table>
|
113 |
</div>
|
114 |
<div class="memdoc"> |
115 |
|
116 |
<p>
|
117 |
Set speed and direction of motor2. |
118 |
<p>
|
119 |
Sets the speed and direction of motor2. motors_init must be called before this function can be used.<p>
|
120 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
121 |
<table border="0" cellspacing="2" cellpadding="0"> |
122 |
<tr><td valign="top"></td><td valign="top"><em>direction</em> </td><td>Either FORWARD or BACKWARD to set the direction of rotation. </td></tr> |
123 |
<tr><td valign="top"></td><td valign="top"><em>speed</em> </td><td>The speed the motor will run at, in the range 0-255.</td></tr> |
124 |
</table>
|
125 |
</dl>
|
126 |
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__motors.html#g751a431c19cdb52bbbc8127455bd41ee" title="Set speed and direction of motor1.">motor1_set</a>, <a class="el" href="group__motors.html#gbad32bfc46c9f31ba81955775611bd21" title="Initialize the motors.">motors_init</a> </dd></dl> |
127 |
|
128 |
<p>Referenced by <a class="el" href="move_8c-source.html#l00070">move()</a>, and <a class="el" href="move_8c-source.html#l00107">move_avoid()</a>.</p> |
129 |
|
130 |
</div>
|
131 |
</div><p> |
132 |
<a class="anchor" name="gbad32bfc46c9f31ba81955775611bd21"></a><!-- doxytag: member="motor.c::motors_init" ref="gbad32bfc46c9f31ba81955775611bd21" args="(void)" --> |
133 |
<div class="memitem"> |
134 |
<div class="memproto"> |
135 |
<table class="memname"> |
136 |
<tr>
|
137 |
<td class="memname">void motors_init </td> |
138 |
<td>(</td> |
139 |
<td class="paramtype">void </td> |
140 |
<td class="paramname"> </td> |
141 |
<td> ) </td> |
142 |
<td width="100%"></td> |
143 |
</tr>
|
144 |
</table>
|
145 |
</div>
|
146 |
<div class="memdoc"> |
147 |
|
148 |
<p>
|
149 |
Initialize the motors. |
150 |
<p>
|
151 |
Initializes both motors so that they can be used with future calls to motor1_set and motor2_set.<p>
|
152 |
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__motors.html#g3c7ada13bc7d8ed5e819910da74bf9cd" title="Turn the motors off.">motors_off</a>, <a class="el" href="group__motors.html#g751a431c19cdb52bbbc8127455bd41ee" title="Set speed and direction of motor1.">motor1_set</a>, <a class="el" href="group__motors.html#g23940fd8408c23fcf312b1d5937f0ab0" title="Set speed and direction of motor2.">motor2_set</a> </dd></dl> |
153 |
|
154 |
<p>Referenced by <a class="el" href="dragonfly__lib_8c-source.html#l00068">dragonfly_init()</a>.</p> |
155 |
|
156 |
</div>
|
157 |
</div><p> |
158 |
<a class="anchor" name="g3c7ada13bc7d8ed5e819910da74bf9cd"></a><!-- doxytag: member="motor.c::motors_off" ref="g3c7ada13bc7d8ed5e819910da74bf9cd" args="(void)" --> |
159 |
<div class="memitem"> |
160 |
<div class="memproto"> |
161 |
<table class="memname"> |
162 |
<tr>
|
163 |
<td class="memname">void motors_off </td> |
164 |
<td>(</td> |
165 |
<td class="paramtype">void </td> |
166 |
<td class="paramname"> </td> |
167 |
<td> ) </td> |
168 |
<td width="100%"></td> |
169 |
</tr>
|
170 |
</table>
|
171 |
</div>
|
172 |
<div class="memdoc"> |
173 |
|
174 |
<p>
|
175 |
Turn the motors off. |
176 |
<p>
|
177 |
Turns off both motors.<p>
|
178 |
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__motors.html#gbad32bfc46c9f31ba81955775611bd21" title="Initialize the motors.">motors_init</a> </dd></dl> |
179 |
|
180 |
</div>
|
181 |
</div><p> |
182 |
</div>
|
183 |
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Apr 16 18:33:23 2009 for libdragonfly by |
184 |
<a href="http://www.doxygen.org/index.html"> |
185 |
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address> |
186 |
</body>
|
187 |
</html>
|