root / branches / encoders / docs / libdragonfly / group__motors.html @ 856
History | View | Annotate | Download (9.36 KB)
1 | 41 | bcoltin | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
---|---|---|---|
2 | 855 | justin | <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
3 | 41 | bcoltin | <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 | 855 | justin | <!-- Generated by Doxygen 1.5.4 -->
|
8 | 41 | bcoltin | <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 | 855 | justin | <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 | 41 | bcoltin | <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 | 855 | justin | 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 | 41 | bcoltin | <p>
|
45 | <hr><h2>Function Documentation</h2> |
||
46 | 855 | justin | <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 | 41 | bcoltin | <tr>
|
51 | 855 | justin | <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 | 41 | bcoltin | </tr>
|
56 | <tr>
|
||
57 | 855 | justin | <td class="paramkey"></td> |
58 | <td></td> |
||
59 | <td class="paramtype">int </td> |
||
60 | <td class="paramname"> <em>speed</em></td><td> </td> |
||
61 | 41 | bcoltin | </tr>
|
62 | <tr>
|
||
63 | 855 | justin | <td></td> |
64 | <td>)</td> |
||
65 | <td></td><td></td><td width="100%"></td> |
||
66 | 41 | bcoltin | </tr>
|
67 | </table>
|
||
68 | 855 | justin | </div>
|
69 | <div class="memdoc"> |
||
70 | 41 | bcoltin | |
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 | 855 | justin | <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 | 41 | bcoltin | <tr>
|
90 | 855 | justin | <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 | 41 | bcoltin | </tr>
|
95 | <tr>
|
||
96 | 855 | justin | <td class="paramkey"></td> |
97 | <td></td> |
||
98 | <td class="paramtype">int </td> |
||
99 | <td class="paramname"> <em>speed</em></td><td> </td> |
||
100 | 41 | bcoltin | </tr>
|
101 | <tr>
|
||
102 | 855 | justin | <td></td> |
103 | <td>)</td> |
||
104 | <td></td><td></td><td width="100%"></td> |
||
105 | 41 | bcoltin | </tr>
|
106 | </table>
|
||
107 | 855 | justin | </div>
|
108 | <div class="memdoc"> |
||
109 | 41 | bcoltin | |
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 | 855 | justin | <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 | 41 | bcoltin | <tr>
|
129 | 855 | justin | <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 | 41 | bcoltin | </tr>
|
136 | </table>
|
||
137 | 855 | justin | </div>
|
138 | <div class="memdoc"> |
||
139 | 41 | bcoltin | |
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 | 855 | justin | <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 | 41 | bcoltin | <tr>
|
153 | 855 | justin | <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 | 41 | bcoltin | </tr>
|
160 | </table>
|
||
161 | 855 | justin | </div>
|
162 | <div class="memdoc"> |
||
163 | 41 | bcoltin | |
164 | <p>
|
||
165 | Turn the motors off. |
||
166 | <p>
|
||
167 | Turns off both motors.<p>
|
||
168 | 855 | justin | <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 | 856 | justin | <hr size="1"><address style="text-align: right;"><small>Generated on Mon Sep 22 22:30:16 2008 for libdragonfly by |
173 | 41 | bcoltin | <a href="http://www.doxygen.org/index.html"> |
174 | 855 | justin | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.4 </small></address> |
175 | 41 | bcoltin | </body>
|
176 | </html> |