root / trunk / docs / libdragonfly / group__motors.html @ 87
History | View | Annotate | Download (9.94 KB)
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
---|---|
2 |
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> |
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.4.6 -->
|
8 |
<div class="tabs"> |
9 |
<ul>
|
10 |
<li><a href="index.html"><span>Main Page</span></a></li> |
11 |
<li><a href="modules.html"><span>Modules</span></a></li> |
12 |
<li><a href="files.html"><span>Files</span></a></li> |
13 |
</ul></div> |
14 |
<h1>Motors</h1>Functions for controlling the motors. Functions for controlling the motors. Found in <a class="el" href="motor_8h.html">motor.h</a>. |
15 |
<a href="#_details">More...</a><table border="0" cellpadding="0" cellspacing="0"> |
16 |
<tr><td></td></tr> |
17 |
<tr><td colspan="2"><br><h2>Defines</h2></td></tr> |
18 |
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g6ddfdda7a062d10cff4a72b76b44aeb8"></a><!-- doxytag: member="motors::FORWARD" ref="g6ddfdda7a062d10cff4a72b76b44aeb8" args="" --> |
19 |
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__motors.html#g6ddfdda7a062d10cff4a72b76b44aeb8">FORWARD</a> 1</td></tr> |
20 |
|
21 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">make the motors go forwards <br></td></tr> |
22 |
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gdf445abfe1b77fa63f89e315ccc2f7f2"></a><!-- doxytag: member="motors::BACKWARD" ref="gdf445abfe1b77fa63f89e315ccc2f7f2" args="" --> |
23 |
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__motors.html#gdf445abfe1b77fa63f89e315ccc2f7f2">BACKWARD</a> 0</td></tr> |
24 |
|
25 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">make the motors go backwards <br></td></tr> |
26 |
<tr><td colspan="2"><br><h2>Functions</h2></td></tr> |
27 |
<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> |
28 |
|
29 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Initialize the motors. <a href="#gbad32bfc46c9f31ba81955775611bd21"></a><br></td></tr> |
30 |
<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> |
31 |
|
32 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set speed and direction of motor1. <a href="#g751a431c19cdb52bbbc8127455bd41ee"></a><br></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#g23940fd8408c23fcf312b1d5937f0ab0">motor2_set</a> (int direction, int speed)</td></tr> |
34 |
|
35 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set speed and direction of motor2. <a href="#g23940fd8408c23fcf312b1d5937f0ab0"></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#g3c7ada13bc7d8ed5e819910da74bf9cd">motors_off</a> (void)</td></tr> |
37 |
|
38 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Turn the motors off. <a href="#g3c7ada13bc7d8ed5e819910da74bf9cd"></a><br></td></tr> |
39 |
</table>
|
40 |
<hr><a name="_details"></a><h2>Detailed Description</h2> |
41 |
Functions for controlling the motors. Functions for controlling the motors. Found in <a class="el" href="motor_8h.html">motor.h</a>. |
42 |
<p>
|
43 |
<hr><h2>Function Documentation</h2> |
44 |
<a class="anchor" name="g751a431c19cdb52bbbc8127455bd41ee"></a><!-- doxytag: member="motor.c::motor1_set" ref="g751a431c19cdb52bbbc8127455bd41ee" args="(int direction, int speed)" --><p> |
45 |
<table class="mdTable" cellpadding="2" cellspacing="0"> |
46 |
<tr>
|
47 |
<td class="mdRow"> |
48 |
<table cellpadding="0" cellspacing="0" border="0"> |
49 |
<tr>
|
50 |
<td class="md" nowrap valign="top">void motor1_set </td> |
51 |
<td class="md" valign="top">( </td> |
52 |
<td class="md" nowrap valign="top">int </td> |
53 |
<td class="mdname" nowrap> <em>direction</em>, </td> |
54 |
</tr>
|
55 |
<tr>
|
56 |
<td class="md" nowrap align="right"></td> |
57 |
<td class="md"></td> |
58 |
<td class="md" nowrap>int </td> |
59 |
<td class="mdname" nowrap> <em>speed</em></td> |
60 |
</tr>
|
61 |
<tr>
|
62 |
<td class="md"></td> |
63 |
<td class="md">) </td> |
64 |
<td class="md" colspan="2"></td> |
65 |
</tr>
|
66 |
</table>
|
67 |
</td>
|
68 |
</tr>
|
69 |
</table>
|
70 |
<table cellspacing="5" cellpadding="0" border="0"> |
71 |
<tr>
|
72 |
<td>
|
73 |
|
74 |
</td>
|
75 |
<td>
|
76 |
|
77 |
<p>
|
78 |
Set speed and direction of motor1. |
79 |
<p>
|
80 |
Sets the speed and direction of motor1. motors_init must be called before this function can be used.<p>
|
81 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
82 |
<table border="0" cellspacing="2" cellpadding="0"> |
83 |
<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> |
84 |
<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> |
85 |
</table>
|
86 |
</dl>
|
87 |
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__motors.html#g23940fd8408c23fcf312b1d5937f0ab0">motor2_set</a>, <a class="el" href="group__motors.html#gbad32bfc46c9f31ba81955775611bd21">motors_init</a> </dd></dl> |
88 |
</td>
|
89 |
</tr>
|
90 |
</table>
|
91 |
<a class="anchor" name="g23940fd8408c23fcf312b1d5937f0ab0"></a><!-- doxytag: member="motor.c::motor2_set" ref="g23940fd8408c23fcf312b1d5937f0ab0" args="(int direction, int speed)" --><p> |
92 |
<table class="mdTable" cellpadding="2" cellspacing="0"> |
93 |
<tr>
|
94 |
<td class="mdRow"> |
95 |
<table cellpadding="0" cellspacing="0" border="0"> |
96 |
<tr>
|
97 |
<td class="md" nowrap valign="top">void motor2_set </td> |
98 |
<td class="md" valign="top">( </td> |
99 |
<td class="md" nowrap valign="top">int </td> |
100 |
<td class="mdname" nowrap> <em>direction</em>, </td> |
101 |
</tr>
|
102 |
<tr>
|
103 |
<td class="md" nowrap align="right"></td> |
104 |
<td class="md"></td> |
105 |
<td class="md" nowrap>int </td> |
106 |
<td class="mdname" nowrap> <em>speed</em></td> |
107 |
</tr>
|
108 |
<tr>
|
109 |
<td class="md"></td> |
110 |
<td class="md">) </td> |
111 |
<td class="md" colspan="2"></td> |
112 |
</tr>
|
113 |
</table>
|
114 |
</td>
|
115 |
</tr>
|
116 |
</table>
|
117 |
<table cellspacing="5" cellpadding="0" border="0"> |
118 |
<tr>
|
119 |
<td>
|
120 |
|
121 |
</td>
|
122 |
<td>
|
123 |
|
124 |
<p>
|
125 |
Set speed and direction of motor2. |
126 |
<p>
|
127 |
Sets the speed and direction of motor2. motors_init must be called before this function can be used.<p>
|
128 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
129 |
<table border="0" cellspacing="2" cellpadding="0"> |
130 |
<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> |
131 |
<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> |
132 |
</table>
|
133 |
</dl>
|
134 |
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__motors.html#g751a431c19cdb52bbbc8127455bd41ee">motor1_set</a>, <a class="el" href="group__motors.html#gbad32bfc46c9f31ba81955775611bd21">motors_init</a> </dd></dl> |
135 |
</td>
|
136 |
</tr>
|
137 |
</table>
|
138 |
<a class="anchor" name="gbad32bfc46c9f31ba81955775611bd21"></a><!-- doxytag: member="motor.c::motors_init" ref="gbad32bfc46c9f31ba81955775611bd21" args="(void)" --><p> |
139 |
<table class="mdTable" cellpadding="2" cellspacing="0"> |
140 |
<tr>
|
141 |
<td class="mdRow"> |
142 |
<table cellpadding="0" cellspacing="0" border="0"> |
143 |
<tr>
|
144 |
<td class="md" nowrap valign="top">void motors_init </td> |
145 |
<td class="md" valign="top">( </td> |
146 |
<td class="md" nowrap valign="top">void </td> |
147 |
<td class="mdname1" valign="top" nowrap> </td> |
148 |
<td class="md" valign="top"> ) </td> |
149 |
<td class="md" nowrap></td> |
150 |
</tr>
|
151 |
</table>
|
152 |
</td>
|
153 |
</tr>
|
154 |
</table>
|
155 |
<table cellspacing="5" cellpadding="0" border="0"> |
156 |
<tr>
|
157 |
<td>
|
158 |
|
159 |
</td>
|
160 |
<td>
|
161 |
|
162 |
<p>
|
163 |
Initialize the motors. |
164 |
<p>
|
165 |
Initializes both motors so that they can be used with future calls to motor1_set and motor2_set.<p>
|
166 |
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__motors.html#g3c7ada13bc7d8ed5e819910da74bf9cd">motors_off</a>, <a class="el" href="group__motors.html#g751a431c19cdb52bbbc8127455bd41ee">motor1_set</a>, <a class="el" href="group__motors.html#g23940fd8408c23fcf312b1d5937f0ab0">motor2_set</a> </dd></dl> |
167 |
</td>
|
168 |
</tr>
|
169 |
</table>
|
170 |
<a class="anchor" name="g3c7ada13bc7d8ed5e819910da74bf9cd"></a><!-- doxytag: member="motor.c::motors_off" ref="g3c7ada13bc7d8ed5e819910da74bf9cd" args="(void)" --><p> |
171 |
<table class="mdTable" cellpadding="2" cellspacing="0"> |
172 |
<tr>
|
173 |
<td class="mdRow"> |
174 |
<table cellpadding="0" cellspacing="0" border="0"> |
175 |
<tr>
|
176 |
<td class="md" nowrap valign="top">void motors_off </td> |
177 |
<td class="md" valign="top">( </td> |
178 |
<td class="md" nowrap valign="top">void </td> |
179 |
<td class="mdname1" valign="top" nowrap> </td> |
180 |
<td class="md" valign="top"> ) </td> |
181 |
<td class="md" nowrap></td> |
182 |
</tr>
|
183 |
</table>
|
184 |
</td>
|
185 |
</tr>
|
186 |
</table>
|
187 |
<table cellspacing="5" cellpadding="0" border="0"> |
188 |
<tr>
|
189 |
<td>
|
190 |
|
191 |
</td>
|
192 |
<td>
|
193 |
|
194 |
<p>
|
195 |
Turn the motors off. |
196 |
<p>
|
197 |
Turns off both motors.<p>
|
198 |
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__motors.html#gbad32bfc46c9f31ba81955775611bd21">motors_init</a> </dd></dl> |
199 |
</td>
|
200 |
</tr>
|
201 |
</table>
|
202 |
<hr size="1"><address style="align: right;"><small>Generated on Wed Sep 26 17:39:31 2007 for libdragonfly by |
203 |
<a href="http://www.doxygen.org/index.html"> |
204 |
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address> |
205 |
</body>
|
206 |
</html>
|