Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pub
libraries
Commits
3369c599
Commit
3369c599
authored
Nov 05, 2019
by
Neil Gershenfeld
Browse files
wip
parent
c1acd590
Pipeline
#4574
passed with stage
in 1 second
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
python/pcb.py
View file @
3369c599
...
...
@@ -1165,6 +1165,107 @@ class choke(part):
# connectors
#
class
ESC
(
part
):
#
# ESC 3x1
# Sullins S1013E-36-ND
#
def
__init__
(
self
,
value
=
''
):
pad_header
=
cube
(
-
.
1
,.
1
,
-
.
05
/
2
,.
05
/
2
,
0
,
0
)
d
=
.
075
self
.
value
=
value
self
.
pad
=
[
point
(
0
,
0
,
0
)]
self
.
labels
=
[]
#
# pin 1: PWM
#
self
.
shape
=
translate
(
pad_header
,
-
d
,
-
.
1
,
0
)
self
.
pad
.
append
(
point
(
-
d
,
-
.
1
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'PWM'
))
#
# pin 2: 5V
#
self
.
shape
=
add
(
self
.
shape
,
translate
(
pad_header
,
d
,
0
,
0
))
self
.
pad
.
append
(
point
(
d
,
0
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'5V'
))
#
# pin 3: GND
#
self
.
shape
=
add
(
self
.
shape
,
translate
(
pad_header
,
-
d
,.
1
,
0
))
self
.
pad
.
append
(
point
(
-
d
,.
1
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'GND'
))
class
I2C4x1
(
part
):
#
# I2C 4x1
# Sullins S5635-ND
#
def
__init__
(
self
,
value
=
''
):
pad_header
=
cube
(
-
.
079
/
2
,.
079
/
2
,
-
.
039
/
2
,.
039
/
2
,
0
,
0
)
d
=
.
209
/
2
-
.
079
/
2
self
.
value
=
value
self
.
pad
=
[
point
(
0
,
0
,
0
)]
self
.
labels
=
[]
#
# pin 1: VCC
#
self
.
shape
=
translate
(
pad_header
,
-
d
,
-
.
15
,
0
)
self
.
pad
.
append
(
point
(
-
d
,
-
.
15
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'1VCC'
))
#
# pin 2: GND
#
self
.
shape
=
add
(
self
.
shape
,
translate
(
pad_header
,
d
,
-
.
05
,
0
))
self
.
pad
.
append
(
point
(
d
,
-
.
05
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'GND'
))
#
# pin 3: SCL
#
self
.
shape
=
add
(
self
.
shape
,
translate
(
pad_header
,
-
d
,.
05
,
0
))
self
.
pad
.
append
(
point
(
-
d
,.
05
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'SCL'
))
#
# pin 4: SDA
#
self
.
shape
=
add
(
self
.
shape
,
translate
(
pad_header
,
d
,.
15
,
0
))
self
.
pad
.
append
(
point
(
d
,.
15
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'SDA'
))
class
I2C4x1i
(
part
):
#
# I2C 4x1 inline
#
def
__init__
(
self
,
value
=
''
):
pad_header
=
cube
(
-
.
079
/
2
,.
079
/
2
,
-
.
039
/
2
,.
039
/
2
,
0
,
0
)
d
=
0
self
.
value
=
value
self
.
pad
=
[
point
(
0
,
0
,
0
)]
self
.
labels
=
[]
#
# pin 1: VCC
#
self
.
shape
=
translate
(
pad_header
,
-
d
,
-
.
15
,
0
)
self
.
pad
.
append
(
point
(
-
d
,
-
.
15
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'1VCC'
))
#
# pin 2: GND
#
self
.
shape
=
add
(
self
.
shape
,
translate
(
pad_header
,
d
,
-
.
05
,
0
))
self
.
pad
.
append
(
point
(
d
,
-
.
05
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'GND'
))
#
# pin 3: SCL
#
self
.
shape
=
add
(
self
.
shape
,
translate
(
pad_header
,
-
d
,.
05
,
0
))
self
.
pad
.
append
(
point
(
-
d
,.
05
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'SCL'
))
#
# pin 4: SDA
#
self
.
shape
=
add
(
self
.
shape
,
translate
(
pad_header
,
d
,.
15
,
0
))
self
.
pad
.
append
(
point
(
d
,.
15
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'SDA'
))
class
RCWL0516
(
part
):
#
# RCWL-0516 Doppler radar
...
...
@@ -1200,7 +1301,7 @@ class RCWL0516(part):
self
.
pad
.
append
(
point
(
-
.
107
,.
1
,
0
))
self
.
labels
.
append
(
self
.
text
(
self
.
pad
[
-
1
].
x
,
self
.
pad
[
-
1
].
y
,
self
.
pad
[
-
1
].
z
,
'VIN'
))
#
# pin
4
: CDS
# pin
5
: CDS
#
self
.
shape
=
add
(
self
.
shape
,
translate
(
pad_header
,.
107
,.
2
,
0
))
self
.
pad
.
append
(
point
(.
107
,.
2
,
0
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment