Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
TripwireHook
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fxk8y
TripwireHook
Commits
8e5633a6
Commit
8e5633a6
authored
3 years ago
by
fxk8y
Browse files
Options
Downloads
Patches
Plain Diff
Add ESP32_HexProg system
parent
105d9334
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
TripwireHook.lib
+72
-22
72 additions, 22 deletions
TripwireHook.lib
TripwireHook.pretty/ESP32_HexProg.kicad_mod
+85
-0
85 additions, 0 deletions
TripwireHook.pretty/ESP32_HexProg.kicad_mod
scripting/hexGrid.py
+47
-0
47 additions, 0 deletions
scripting/hexGrid.py
with
204 additions
and
22 deletions
TripwireHook.lib
+
72
−
22
View file @
8e5633a6
...
...
@@ -163,6 +163,28 @@ X SW 6 350 0 100 L 50 50 1 1 O
ENDDRAW
ENDDEF
#
# D_TVS_UNI
#
DEF D_TVS_UNI D 0 40 N N 1 F N
F0 "D" 0 100 50 H V C CNN
F1 "D_TVS_UNI" 0 -100 50 H V C CNN
F2 "" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
$FPLIST
TO-???*
*_Diode_*
*SingleDiode*
D_*
$ENDFPLIST
DRAW
P 2 0 1 0 50 0 -50 0 N
P 4 0 1 10 -30 50 -50 50 -50 -50 -70 -50 N
P 4 0 1 10 50 50 50 -50 -50 0 50 50 N
X A1 1 -150 0 100 R 50 50 1 1 P
X A2 2 150 0 100 L 50 50 1 1 P
ENDDRAW
ENDDEF
#
# EP4CE6E22
#
DEF EP4CE6E22 U 0 40 Y Y 9 L N
...
...
@@ -444,6 +466,56 @@ X MSEL2 97 3200 -950 100 R 50 50 9 1 I
ENDDRAW
ENDDEF
#
# ESP32_HexProg
#
DEF ESP32_HexProg U 0 40 Y Y 1 F N
F0 "U" -200 250 50 H V C CNN
F1 "ESP32_HexProg" 400 250 50 H V C CNN
F2 "TripwireHook:ESP32_HexProg" 100 -300 50 H I C CNN
F3 "" 0 100 50 H I C CNN
DRAW
S -50 50 50 -50 0 1 0 F
S -45 50 45 80 0 1 0 N
P 2 0 1 0 -50 -45 -55 -45 N
P 2 0 1 0 -50 -35 -55 -35 N
P 2 0 1 0 -50 -25 -55 -25 N
P 2 0 1 0 -50 -15 -55 -15 N
P 2 0 1 0 -50 -5 -55 -5 N
P 2 0 1 0 -50 5 -55 5 N
P 2 0 1 0 -50 15 -55 15 N
P 2 0 1 0 -50 25 -55 25 N
P 2 0 1 0 -50 35 -55 35 N
P 2 0 1 0 -50 45 -55 45 N
P 2 0 1 0 -35 -50 -35 -55 N
P 2 0 1 0 -25 -50 -25 -55 N
P 2 0 1 0 -15 -50 -15 -55 N
P 2 0 1 0 -5 -50 -5 -55 N
P 2 0 1 0 5 -50 5 -55 N
P 2 0 1 0 15 -50 15 -55 N
P 2 0 1 0 25 -50 25 -55 N
P 2 0 1 0 35 -50 35 -55 N
P 4 0 1 0 20 50 20 70 30 70 30 50 N
P 7 0 1 0 -150 100 0 250 150 100 150 -100 0 -250 -150 -100 -150 100 f
P 11 0 1 0 20 70 10 70 10 60 0 60 0 70 -10 70 -10 60 -20 60 -20 70 -30 70 -30 60 N
P 2 1 1 0 55 -45 50 -45 N
P 2 1 1 0 55 -35 50 -35 N
P 2 1 1 0 55 -25 50 -25 N
P 2 1 1 0 55 -15 50 -15 N
P 2 1 1 0 55 -5 50 -5 N
P 2 1 1 0 55 5 50 5 N
P 2 1 1 0 55 15 50 15 N
P 2 1 1 0 55 25 50 25 N
P 2 1 1 0 55 35 50 35 N
P 2 1 1 0 55 45 50 45 N
X ~ 3V3 0 -400 150 U 50 50 1 1 I
X ~ GND 0 400 150 D 50 50 1 1 I
X ~ RX -300 -100 150 R 50 50 1 1 I
X ~ TX -300 100 150 R 50 50 1 1 I
X ~ ~PROG 300 -100 150 L 31 50 1 1 I
X ~ ~RESET 300 100 150 L 31 50 1 1 I
ENDDRAW
ENDDEF
#
# HPDL-1414
#
DEF HPDL-1414 U 0 40 Y Y 1 F N
...
...
@@ -695,26 +767,4 @@ X DIN 4 -300 0 100 R 50 50 1 1 I
ENDDRAW
ENDDEF
#
# D_TVS_UNI
#
DEF D_TVS_UNI D 0 40 N N 1 F N
F0 "D" 0 100 50 H V C CNN
F1 "D_TVS_UNI" 0 -100 50 H V C CNN
F2 "" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
$FPLIST
TO-???*
*_Diode_*
*SingleDiode*
D_*
$ENDFPLIST
DRAW
P 2 0 1 0 50 0 -50 0 N
P 4 0 1 10 -30 50 -50 50 -50 -50 -70 -50 N
P 4 0 1 10 50 50 50 -50 -50 0 50 50 N
X A1 1 -150 0 100 R 50 50 1 1 P
X A2 2 150 0 100 L 50 50 1 1 P
ENDDRAW
ENDDEF
#
#End Library
This diff is collapsed.
Click to expand it.
TripwireHook.pretty/ESP32_HexProg.kicad_mod
0 → 100644
+
85
−
0
View file @
8e5633a6
(module ESP32_HexProg (layer F.Cu) (tedit 60943A15)
(fp_text reference REF** (at 0 -4) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value ESP32_HexProg (at 0 4) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_poly (pts (xy 1.09 -2.08) (xy 0.54 -1.14) (xy -0.54 -1.14) (xy -1.08 -2.08)
(xy -0.54 -3.02) (xy 0.55 -3.02)) (layer F.SilkS) (width 0.6))
(fp_line (start -1.25 -1.98) (end -2.34 -1.98) (layer F.SilkS) (width 0.4))
(fp_line (start 1.25 -1.98) (end 2.34 -1.98) (layer F.SilkS) (width 0.4))
(fp_line (start -2.34 -1.98) (end -2.88 -1.04) (layer Dwgs.User) (width 0.12))
(fp_line (start -2.88 -1.04) (end -2.34 -0.1) (layer Dwgs.User) (width 0.12))
(fp_line (start -2.34 -0.1) (end -2.34 0.1) (layer Dwgs.User) (width 0.12))
(fp_line (start -2.34 0.1) (end -2.88 1.04) (layer Dwgs.User) (width 0.12))
(fp_line (start -2.88 1.04) (end -2.34 1.98) (layer Dwgs.User) (width 0.12))
(fp_line (start -2.34 1.98) (end -1.26 1.98) (layer Dwgs.User) (width 0.12))
(fp_line (start -1.26 1.98) (end -1.08 2.08) (layer Dwgs.User) (width 0.12))
(fp_line (start -1.08 2.08) (end -0.54 3.02) (layer Dwgs.User) (width 0.12))
(fp_line (start -0.54 3.02) (end 0.54 3.02) (layer Dwgs.User) (width 0.12))
(fp_line (start 0.54 3.02) (end 1.08 2.08) (layer Dwgs.User) (width 0.12))
(fp_line (start 1.08 2.08) (end 1.26 1.98) (layer Dwgs.User) (width 0.12))
(fp_line (start 1.26 1.98) (end 2.34 1.98) (layer Dwgs.User) (width 0.12))
(fp_line (start 2.35 -1.98) (end 2.89 -1.04) (layer Dwgs.User) (width 0.12))
(fp_line (start 2.89 -1.04) (end 2.34 -0.1) (layer Dwgs.User) (width 0.12))
(fp_line (start 2.34 -0.1) (end 2.34 0.1) (layer Dwgs.User) (width 0.12))
(fp_line (start 2.34 0.1) (end 2.89 1.04) (layer Dwgs.User) (width 0.12))
(fp_line (start 2.89 1.04) (end 2.34 1.98) (layer Dwgs.User) (width 0.12))
(pad 3V3 smd custom (at 0 2.08 30) (size 1.5 1.5) (layers F.Cu F.Paste F.Mask)
(zone_connect 0)
(options (clearance outline) (anchor circle))
(primitives
(gr_poly (pts
(xy 0.94 -0.54) (xy 0.94 0.54) (xy 0 1.08) (xy -0.93 0.54) (xy -0.93 -0.54)
(xy 0 -1.08)) (width 0.01))
))
(pad TX smd custom (at -1.8 -1.04 30) (size 1.5 1.5) (layers F.Cu F.Paste F.Mask)
(zone_connect 0)
(options (clearance outline) (anchor circle))
(primitives
(gr_poly (pts
(xy 0.94 -0.54) (xy 0.94 0.54) (xy 0 1.08) (xy -0.93 0.54) (xy -0.93 -0.54)
(xy 0 -1.08)) (width 0.01))
))
(pad RX smd custom (at -1.8 1.04 30) (size 1.5 1.5) (layers F.Cu F.Paste F.Mask)
(zone_connect 0)
(options (clearance outline) (anchor circle))
(primitives
(gr_poly (pts
(xy 0.94 -0.54) (xy 0.94 0.54) (xy 0 1.08) (xy -0.93 0.54) (xy -0.93 -0.54)
(xy 0 -1.08)) (width 0.01))
))
(pad ~RESET smd custom (at 1.8 -1.04 30) (size 1.5 1.5) (layers F.Cu F.Paste F.Mask)
(zone_connect 0)
(options (clearance outline) (anchor circle))
(primitives
(gr_poly (pts
(xy 0.94 -0.54) (xy 0.94 0.54) (xy 0 1.08) (xy -0.93 0.54) (xy -0.93 -0.54)
(xy 0 -1.08)) (width 0.01))
))
(pad GND smd custom (at 0 -2.08 30) (size 1.5 1.5) (layers F.Cu F.Paste F.Mask)
(zone_connect 0)
(options (clearance outline) (anchor circle))
(primitives
(gr_poly (pts
(xy 0.94 -0.54) (xy 0.94 0.54) (xy 0 1.08) (xy -0.93 0.54) (xy -0.93 -0.54)
(xy 0 -1.08)) (width 0.01))
))
(pad ~PROG smd custom (at 1.8 1.04 30) (size 1.5 1.5) (layers F.Cu F.Paste F.Mask)
(zone_connect 0)
(options (clearance outline) (anchor circle))
(primitives
(gr_poly (pts
(xy 0.94 -0.54) (xy 0.94 0.54) (xy 0 1.08) (xy -0.93 0.54) (xy -0.93 -0.54)
(xy 0 -1.08)) (width 0.01))
))
(pad GND smd custom (at 0 0 30) (size 1.5 1.5) (layers F.Cu F.Paste F.Mask)
(zone_connect 0)
(options (clearance outline) (anchor circle))
(primitives
(gr_poly (pts
(xy 0.94 -0.54) (xy 0.94 0.54) (xy 0 1.08) (xy -0.93 0.54) (xy -0.93 -0.54)
(xy 0 -1.08)) (width 0.01))
))
)
This diff is collapsed.
Click to expand it.
scripting/hexGrid.py
0 → 100755
+
47
−
0
View file @
8e5633a6
#!/usr/bin/env nix-shell
#!nix-shell -p python3 -i python --pure
from
math
import
*
# pointy top
def
hex_to_pixel
(
hex_x
,
hex_y
,
size
=
1.2
):
x
=
size
*
(
sqrt
(
3
)
*
hex_x
+
sqrt
(
3
)
/
2
*
hex_y
)
y
=
size
*
(
3
/
2
*
hex_y
)
return
(
x
,
y
)
# flat top
def
hex_to_pixel2
(
hex_x
,
hex_y
,
size
=
1.2
):
x
=
size
*
(
3
/
2
*
hex_x
)
y
=
size
*
(
sqrt
(
3
)
/
2
*
hex_x
+
sqrt
(
3
)
*
hex_y
)
return
(
x
,
y
)
def
iter_print
(
hexList
,
f
=
hex_to_pixel
):
for
hex
in
hexList
:
pixel
=
f
(
*
hex
)
hex_str
=
'
({: d}, {: d})
'
.
format
(
hex
[
0
],
hex
[
1
])
pixel_str
=
'
({: .2f}, {: .2f})
'
.
format
(
pixel
[
0
],
pixel
[
1
])
print
(
'
{0} -> {1}
'
.
format
(
hex_str
,
pixel_str
))
if
__name__
==
'
__main__
'
:
hexList
=
[
(
0
,
0
),
(
0
,
1
),
(
1
,
0
),
(
0
,
-
1
),
(
-
1
,
0
),
(
1
,
1
),
(
-
1
,
-
1
),
(
0
,
-
2
),
(
1
,
-
2
),
(
-
1
,
-
2
),
]
iter_print
(
hexList
,
hex_to_pixel2
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment