Spring Model Electronics Co.Ltd
TEL
:
+86-755-2974-9810 FAX
:
+86-755-2974-9779 www.springrc.com
(
v
:
1.0
)
Page 40 of 49
5.24 Realize control logic
The realization of servo swing logic
When we have servo position and speed control function
,
then we can complete the control
logic of a servo swaying between two positions
。
Here suppose the ID No. is 1 for the servo
needs control
,
the modified main function code is below
:
/**********************************Function Info ***********************
** (Function Name):
main
**
** (Description):
(Wave the Servo of ID 1)
**
**
** (Input Variable):
void
** (Return Value):
int
**
** (Macro or constant used):
None
** (Global variable used):
None
**
** (Other function called):
None
**
** (Author):
robot
** (Date created):
2010-3-25
**
** (Revised):