root / branches / encoders / docs / libdragonfly / group__motors.html @ 856
History | View | Annotate | Download (9.36 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.4 -->
|
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 |
<li><a href="pages.html"><span>Related Pages</span></a></li> |
14 |
</ul>
|
15 |
</div>
|
16 |
<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>. |
17 |
<a href="#_details">More...</a><table border="0" cellpadding="0" cellspacing="0"> |
18 |
<tr><td></td></tr> |
19 |
<tr><td colspan="2"><br><h2>Defines</h2></td></tr> |
20 |
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g6ddfdda7a062d10cff4a72b76b44aeb8"></a><!-- doxytag: member="motors::FORWARD" ref="g6ddfdda7a062d10cff4a72b76b44aeb8" args="" --> |
21 |
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__motors.html#g6ddfdda7a062d10cff4a72b76b44aeb8">FORWARD</a> 1</td></tr> |
22 |
|
23 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">make the motors go forwards <br></td></tr> |
24 |
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gdf445abfe1b77fa63f89e315ccc2f7f2"></a><!-- doxytag: member="motors::BACKWARD" ref="gdf445abfe1b77fa63f89e315ccc2f7f2" args="" --> |
25 |
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__motors.html#gdf445abfe1b77fa63f89e315ccc2f7f2">BACKWARD</a> 0</td></tr> |
26 |
|
27 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">make the motors go backwards <br></td></tr> |
28 |
<tr><td colspan="2"><br><h2>Functions</h2></td></tr> |
29 |
<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> |
30 |
|
31 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Initialize the motors. <a href="#gbad32bfc46c9f31ba81955775611bd21"></a><br></td></tr> |
32 |
<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> |
33 |
|
34 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set speed and direction of motor1. <a href="#g751a431c19cdb52bbbc8127455bd41ee"></a><br></td></tr> |
35 |
<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> |
36 |
|
37 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set speed and direction of motor2. <a href="#g23940fd8408c23fcf312b1d5937f0ab0"></a><br></td></tr> |
38 |
<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> |
39 |
|
40 |
<tr><td class="mdescLeft"> </td><td class="mdescRight">Turn the motors off. <a href="#g3c7ada13bc7d8ed5e819910da74bf9cd"></a><br></td></tr> |
41 |
</table>
|
42 |
<hr><a name="_details"></a><h2>Detailed Description</h2> |
43 |
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>. |
44 |
<p>
|
45 |
<hr><h2>Function Documentation</h2> |
46 |
<a class="anchor" name="g751a431c19cdb52bbbc8127455bd41ee"></a><!-- doxytag: member="motor.c::motor1_set" ref="g751a431c19cdb52bbbc8127455bd41ee" args="(int direction, int speed)" --> |
47 |
<div class="memitem"> |
48 |
<div class="memproto"> |
49 |
<table class="memname"> |
50 |
<tr>
|
51 |
<td class="memname">void motor1_set </td> |
52 |
<td>(</td> |
53 |
<td class="paramtype">int </td> |
54 |
<td class="paramname"> <em>direction</em>, </td> |
55 |
</tr>
|
56 |
<tr>
|
57 |
<td class="paramkey"></td> |
58 |
<td></td> |
59 |
<td class="paramtype">int </td> |
60 |
<td class="paramname"> <em>speed</em></td><td> </td> |
61 |
</tr>
|
62 |
<tr>
|
63 |
<td></td> |
64 |
<td>)</td> |
65 |
<td></td><td></td><td width="100%"></td> |
66 |
</tr>
|
67 |
</table>
|
68 |
</div>
|
69 |
<div class="memdoc"> |
70 |
|
71 |
<p>
|
72 |
Set speed and direction of motor1. |
73 |
<p>
|
74 |
Sets the speed and direction of motor1. motors_init must be called before this function can be used.<p>
|
75 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
76 |
<table border="0" cellspacing="2" cellpadding="0"> |
77 |
<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> |
78 |
<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> |
79 |
</table>
|
80 |
</dl>
|
81 |
<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> |
82 |
|
83 |
</div>
|
84 |
</div><p> |
85 |
<a class="anchor" name="g23940fd8408c23fcf312b1d5937f0ab0"></a><!-- doxytag: member="motor.c::motor2_set" ref="g23940fd8408c23fcf312b1d5937f0ab0" args="(int direction, int speed)" --> |
86 |
<div class="memitem"> |
87 |
<div class="memproto"> |
88 |
<table class="memname"> |
89 |
<tr>
|
90 |
<td class="memname">void motor2_set </td> |
91 |
<td>(</td> |
92 |
<td class="paramtype">int </td> |
93 |
<td class="paramname"> <em>direction</em>, </td> |
94 |
</tr>
|
95 |
<tr>
|
96 |
<td class="paramkey"></td> |
97 |
<td></td> |
98 |
<td class="paramtype">int </td> |
99 |
<td class="paramname"> <em>speed</em></td><td> </td> |
100 |
</tr>
|
101 |
<tr>
|
102 |
<td></td> |
103 |
<td>)</td> |
104 |
<td></td><td></td><td width="100%"></td> |
105 |
</tr>
|
106 |
</table>
|
107 |
</div>
|
108 |
<div class="memdoc"> |
109 |
|
110 |
<p>
|
111 |
Set speed and direction of motor2. |
112 |
<p>
|
113 |
Sets the speed and direction of motor2. motors_init must be called before this function can be used.<p>
|
114 |
<dl compact><dt><b>Parameters:</b></dt><dd> |
115 |
<table border="0" cellspacing="2" cellpadding="0"> |
116 |
<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> |
117 |
<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> |
118 |
</table>
|
119 |
</dl>
|
120 |
<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> |
121 |
|
122 |
</div>
|
123 |
</div><p> |
124 |
<a class="anchor" name="gbad32bfc46c9f31ba81955775611bd21"></a><!-- doxytag: member="motor.c::motors_init" ref="gbad32bfc46c9f31ba81955775611bd21" args="(void)" --> |
125 |
<div class="memitem"> |
126 |
<div class="memproto"> |
127 |
<table class="memname"> |
128 |
<tr>
|
129 |
<td class="memname">void motors_init </td> |
130 |
<td>(</td> |
131 |
<td class="paramtype">void </td> |
132 |
<td class="paramname"> </td> |
133 |
<td> ) </td> |
134 |
<td width="100%"></td> |
135 |
</tr>
|
136 |
</table>
|
137 |
</div>
|
138 |
<div class="memdoc"> |
139 |
|
140 |
<p>
|
141 |
Initialize the motors. |
142 |
<p>
|
143 |
Initializes both motors so that they can be used with future calls to motor1_set and motor2_set.<p>
|
144 |
<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> |
145 |
|
146 |
</div>
|
147 |
</div><p> |
148 |
<a class="anchor" name="g3c7ada13bc7d8ed5e819910da74bf9cd"></a><!-- doxytag: member="motor.c::motors_off" ref="g3c7ada13bc7d8ed5e819910da74bf9cd" args="(void)" --> |
149 |
<div class="memitem"> |
150 |
<div class="memproto"> |
151 |
<table class="memname"> |
152 |
<tr>
|
153 |
<td class="memname">void motors_off </td> |
154 |
<td>(</td> |
155 |
<td class="paramtype">void </td> |
156 |
<td class="paramname"> </td> |
157 |
<td> ) </td> |
158 |
<td width="100%"></td> |
159 |
</tr>
|
160 |
</table>
|
161 |
</div>
|
162 |
<div class="memdoc"> |
163 |
|
164 |
<p>
|
165 |
Turn the motors off. |
166 |
<p>
|
167 |
Turns off both motors.<p>
|
168 |
<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> |
169 |
|
170 |
</div>
|
171 |
</div><p> |
172 |
<hr size="1"><address style="text-align: right;"><small>Generated on Mon Sep 22 22:30:16 2008 for libdragonfly by |
173 |
<a href="http://www.doxygen.org/index.html"> |
174 |
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.4 </small></address> |
175 |
</body>
|
176 |
</html>
|