Skip to content

Commit ac480f3

Browse files
authored
Create README.md
1 parent 2164d82 commit ac480f3

File tree

1 file changed

+104
-0
lines changed

1 file changed

+104
-0
lines changed

README.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# Servo Library for OpenSCAD
2+
Created by Brad Kartchner (kartchnb@gmail.com)
3+
4+
This library is designed to make it easier to create designs incorporting
5+
standard servos.
6+
7+
Methods are provided to access dimensions for each servo and to generate models
8+
of them.
9+
10+
Although I believe this library is fully-featured, only a very limited selection of servos (ones that I personally have on hand) have been included. It's fairly easy to add more, though.
11+
12+
A current list of supported servos can always be obtained by echoing the value
13+
of the ServoLib_ValidServoModels variable. For example:
14+
echo (ServoLib_ValidServoModels);
15+
16+
As of version 2.0.0, the supported servo models are:
17+
["S3003 (Clone)", "MG90S (Clone)", "SG90 (Clone)", "GH-S37D"]
18+
19+
-------------------------------------------------------------------------------
20+
## METHODS
21+
### ServoLib_GenerateServo(servo_model, xcenter, zcenter)
22+
This method generates a basic model of the specified servo.
23+
The generated model is intended to be a guide for designing around servo hardware. It is not intended to be accurate beyond the basic measurements.
24+
25+
The method accepts the following parameters:
26+
* `servo_model` - the name of the servo to model.
27+
28+
* `xcenter ` - specifies where the motor should be centered horizontally (defaults to "axle")
29+
"axle" generates the motor centered on the axle.
30+
"body" generates the motor with the body centered along the origin.
31+
32+
* `zcenter` - determines where the motor is positioned on the z-axis (defaults to "axle top").
33+
"axle top" generates the motor with the top of the axle on the XY plane.
34+
"axle base" or "body top" generates the motor with the bottom of the axle on the XY plane.
35+
"wing top" generates the motor with the top of the wings on the XY plane.
36+
"wing bottom" generates the motor with the bottom of the wings on the XY plane.
37+
"body base" or "base" generates the motor with the entire servo above the XY plane.
38+
39+
### ServoLib_GenerateScrewHolesOutline(servo_model)
40+
Generates a 2D hole pattern for the servo's mounting screw holes.
41+
This pattern can be extruded to create mounting screw holes in your model.
42+
43+
The method accepts the following parameters:
44+
* `servo_model` - the name of the servo to model.
45+
-------------------------------------------------------------------------------
46+
## FUNCTIONS
47+
### ServoLib_ServoModelIsValid(servo_model)
48+
Returns true if servo_model is a recognized Servo Model Name.
49+
The function accepts the following parameters:
50+
* `servo_model` - the name of the servo to model.
51+
52+
### ServoLib_AftHeight(servo_model)
53+
Returns the Aft Height of the specified servo model (see diagrams below).
54+
The function accepts the following parameters:
55+
* `servo_model` - the name of the servo to model.
56+
57+
### ServoLib_WingHeight(servo_model)
58+
Returns the Wing Height of the specified servo model (see diagrams below).
59+
The function accepts the following parameters:
60+
* `servo_model` - the name of the servo to model.
61+
62+
### ServoLib_ForeHeight(servo_model)
63+
Returns the Fore Height of the specified servo model (see diagrams below).
64+
The function accepts the following parameters:
65+
* `servo_model` - the name of the servo to model.
66+
67+
### ServoLib_AxleHeight(servo_model)
68+
Returns the Axle Height of the specified servo model (see diagrams below).
69+
The function accepts the following parameters:
70+
* `servo_model` - the name of the servo to model.
71+
72+
### ServoLib_BodyWidth(servo_model)
73+
Returns the Body Width of the specified servo model (see diagrams below).
74+
The function accepts the following parameters:
75+
* `servo_model` - the name of the servo to model.
76+
77+
### ServoLib_WingWidth(servo_model)
78+
Returns the Wing Width of the specified servo model (see diagrams below).
79+
The function accepts the following parameters:
80+
* `servo_model` - the name of the servo to model.
81+
82+
### ServoLib_AxleOffset(servo_model)
83+
Returns the Axle Offset of the specified servo model (see diagrams below).
84+
The function accepts the following parameters:
85+
* `servo_model` - the name of the servo to model.
86+
87+
### ServoLib_AxleDiameter(servo_model)
88+
Returns the Axle Diameter of the specified servo model (see diagrams below).
89+
The function accepts the following parameters:
90+
* `servo_model` - the name of the servo to model.
91+
92+
### ServoLib_BodyLength(servo_model)
93+
Returns the Body Length of the specified servo model (see diagrams below).
94+
The function accepts the following parameters:
95+
* `servo_model` - the name of the servo to model.
96+
97+
### ServoLib_BodyHeight(servo_model)
98+
Returns the Body Height of the specified servo model (see diagrams below).
99+
The function accepts the following parameters:
100+
* `servo_model` - the name of the servo to model.
101+
-------------------------------------------------------------------------------
102+
Diagram of servo measurements:
103+
104+
![servo diagram](https://user-images.githubusercontent.com/54730012/158481400-c6d95aa7-3db0-4da5-b4b7-e66df4bb73a3.png)

0 commit comments

Comments
 (0)