-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConfig.py
More file actions
59 lines (52 loc) · 1.24 KB
/
Config.py
File metadata and controls
59 lines (52 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
from Leg import *
from Servo import *
from constants import *
import math
from Connexion import *
def configLegs(connexion = Connexion()):
Leg.a = 72
Leg.b = 100
Leg.a1 = 0
Leg.a2 = 0
Leg.ab0 = 0
Leg.ab1 = 0
Leg.ab2 = 0
Leg.liftTime = 5.0
Leg.forwardTime = 5.0
Leg.pullTime = 5.0
#define SERVO_BR1 0
#define SERVO_BR2 1
#define SERVO_BL1 2
#define SERVO_BL2 3
#define SERVO_FM1 4
#define SERVO_FR1 5
#define SERVO_FR2 6
#define SERVO_FR3 7
#define SERVO_FR4 8
#define SERVO_FL1 9
#define SERVO_FL2 10
#define SERVO_FL3 11
BR1 = 0
BR2 = 1
BL1 = 2
BL2 = 3
FM1 = 4
FR1 = 5
FR2 = 6
FR3 = 7
FR4 = 8
FL1 = 9
FL2 = 10
FL3 = 11
return (
Leg((Servo(connexion, BR1, offset=90), Servo(connexion, BR2, offset=-90)), LegType.BACK),
Leg((Servo(connexion, BL1, offset=90), Servo(connexion, BL2)), LegType.BACK)
)
"""
return (
Leg((Servo(connexion, 9), Servo(connexion, 10), Servo(connexion, 16)), LegType.FRONT), #FRONT LEFT LEG
Leg((Servo(connexion, 27), Servo(connexion, 26), Servo(connexion, 25)), LegType.FRONT), #FRONT RIGHT LEG
Leg((Servo(connexion, 5), Servo(connexion, 8)), LegType.BACK), #BACK RIGHT LEG
Leg((Servo(connexion, 11), Servo(connexion, 3)), LegType.BACK) #BACK LEFT LEG
)
"""