Compare commits

23 Commits

Author SHA1 Message Date
4a06855f4e Got controller connected and working, buttons broken 2026-05-15 16:38:57 +12:00
1ff9b657a1 Minor mods 2026-05-12 09:55:39 +12:00
sirlilpanda
5c45a3313f fixed unconnected grounds, removed solder mask for high current traces, fixed silkscreen 2026-05-11 23:50:46 +12:00
e239240178 Fixed mistakes with mosfets on PCB my bad UwU 2026-05-11 21:22:06 +12:00
3f4bef7cbf Added exmaple code of lsm6do to quickly test imu 2026-05-11 21:21:45 +12:00
sirlilpanda
4d334124a7 fixed #7 and #8 2026-05-10 19:57:44 +12:00
baf2f0be9e Created wacky_bully project + a bit of work towards implementing motor drivers 2026-05-08 16:38:10 +12:00
52aac06b2c AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH 2026-05-06 12:50:00 +12:00
f21f909a71 Added the zig_main project to software for zig based implementation of code for robot 2026-05-05 20:14:04 +12:00
7d752f2534 fixed image path 2026-04-29 08:40:40 +12:00
012741879d reverted 2026-04-29 11:16:18 +12:00
c998778acd esp32 example software 2026-04-29 11:15:26 +12:00
91b00cb30a updated ignore for software 2026-04-29 11:14:42 +12:00
e14f685a29 Merge pull request 'PCB_ROUTING_ATTEMPT_1' (#6) from PCB_ROUTING_ATTEMPT_1 into main
Reviewed-on: #6
2026-04-28 02:24:53 -07:00
sirlilpanda
00694af455 updated bom and finished pcb 2026-04-28 14:02:48 +12:00
sirlilpanda
9f4d4fa744 changed indcutors to ones available 2026-04-15 11:41:05 +12:00
sirlilpanda
57c3152b16 finished 2026-04-15 11:16:10 +12:00
940af76ffb file uneeded and stopping windows users from accessing this branch 2026-04-14 03:41:28 -07:00
8d0db5fe05 auto commited 2026-04-14 22:31:58 +12:00
605dc84ea0 auto commited 2026-04-14 22:31:58 +12:00
937dc9bcec auto commited 2026-04-14 22:31:58 +12:00
cde648f312 WIP 2026-04-14 22:31:26 +12:00
2dcff7350a Update README.md 2026-03-22 03:53:37 -07:00
237 changed files with 534788 additions and 42851 deletions

5
.gitignore vendored
View File

@@ -41,3 +41,8 @@ fp-info-cache
# Local project settings # Local project settings
*.kicad_prl *.kicad_prl
# for esp idf
**/build/
**/.cache/

25392
PCBs/esp32-racer-B_Cu.gbr Normal file

File diff suppressed because it is too large Load Diff

477
PCBs/esp32-racer-B_Mask.gbr Normal file
View File

@@ -0,0 +1,477 @@
%TF.GenerationSoftware,KiCad,Pcbnew,10.0.0*%
%TF.CreationDate,2026-04-16T08:54:22+12:00*%
%TF.ProjectId,esp32-racer,65737033-322d-4726-9163-65722e6b6963,rev?*%
%TF.SameCoordinates,Original*%
%TF.FileFunction,Soldermask,Bot*%
%TF.FilePolarity,Negative*%
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 10.0.0) date 2026-04-16 08:54:22*
%MOMM*%
%LPD*%
G01*
G04 APERTURE LIST*
G04 Aperture macros list*
%AMRoundRect*
0 Rectangle with rounded corners*
0 $1 Rounding radius*
0 $2 $3 $4 $5 $6 $7 $8 $9 X,Y pos of 4 corners*
0 Add a 4 corners polygon primitive as box body*
4,1,4,$2,$3,$4,$5,$6,$7,$8,$9,$2,$3,0*
0 Add four circle primitives for the rounded corners*
1,1,$1+$1,$2,$3*
1,1,$1+$1,$4,$5*
1,1,$1+$1,$6,$7*
1,1,$1+$1,$8,$9*
0 Add four rect primitives between the rounded corners*
20,1,$1+$1,$2,$3,$4,$5,0*
20,1,$1+$1,$4,$5,$6,$7,0*
20,1,$1+$1,$6,$7,$8,$9,0*
20,1,$1+$1,$8,$9,$2,$3,0*%
G04 Aperture macros list end*
%ADD10R,1.700000X1.700000*%
%ADD11C,1.700000*%
%ADD12C,5.600000*%
%ADD13C,1.400000*%
%ADD14RoundRect,0.770000X0.980000X0.980000X-0.980000X0.980000X-0.980000X-0.980000X0.980000X-0.980000X0*%
%ADD15C,3.500000*%
%ADD16C,1.440000*%
%ADD17RoundRect,0.250000X0.450000X-0.450000X0.450000X0.450000X-0.450000X0.450000X-0.450000X-0.450000X0*%
%ADD18C,0.650000*%
%ADD19O,1.000000X2.100000*%
%ADD20O,1.000000X1.600000*%
%ADD21RoundRect,0.250000X-0.450000X0.450000X-0.450000X-0.450000X0.450000X-0.450000X0.450000X0.450000X0*%
%ADD22RoundRect,0.575000X-0.575000X0.575000X-0.575000X-0.575000X0.575000X-0.575000X0.575000X0.575000X0*%
%ADD23C,2.300000*%
%ADD24R,2.000000X0.900000*%
%ADD25C,4.100000*%
%ADD26RoundRect,1.025000X-1.025000X1.025000X-1.025000X-1.025000X1.025000X-1.025000X1.025000X1.025000X0*%
%ADD27C,0.600000*%
%ADD28RoundRect,0.150000X0.512500X0.150000X-0.512500X0.150000X-0.512500X-0.150000X0.512500X-0.150000X0*%
%ADD29RoundRect,0.200000X0.275000X-0.200000X0.275000X0.200000X-0.275000X0.200000X-0.275000X-0.200000X0*%
%ADD30RoundRect,0.225000X-0.335876X-0.017678X-0.017678X-0.335876X0.335876X0.017678X0.017678X0.335876X0*%
%ADD31RoundRect,0.140000X-0.170000X0.140000X-0.170000X-0.140000X0.170000X-0.140000X0.170000X0.140000X0*%
%ADD32RoundRect,0.225000X0.225000X0.250000X-0.225000X0.250000X-0.225000X-0.250000X0.225000X-0.250000X0*%
%ADD33RoundRect,0.250000X1.000000X0.650000X-1.000000X0.650000X-1.000000X-0.650000X1.000000X-0.650000X0*%
%ADD34RoundRect,0.150000X-0.150000X0.587500X-0.150000X-0.587500X0.150000X-0.587500X0.150000X0.587500X0*%
%ADD35RoundRect,0.150000X-0.512500X-0.150000X0.512500X-0.150000X0.512500X0.150000X-0.512500X0.150000X0*%
%ADD36RoundRect,0.150000X0.150000X-0.587500X0.150000X0.587500X-0.150000X0.587500X-0.150000X-0.587500X0*%
%ADD37RoundRect,0.225000X-0.250000X0.225000X-0.250000X-0.225000X0.250000X-0.225000X0.250000X0.225000X0*%
%ADD38RoundRect,0.075000X-0.075000X0.650000X-0.075000X-0.650000X0.075000X-0.650000X0.075000X0.650000X0*%
G04 APERTURE END LIST*
D10*
%TO.C,J1*%
X116550000Y-54300000D03*
D11*
X114010000Y-54300000D03*
X111470001Y-54300000D03*
%TD*%
D10*
%TO.C,JP1*%
X92670001Y-113308214D03*
D11*
X92670001Y-110768214D03*
X92670001Y-108228215D03*
%TD*%
D10*
%TO.C,J7*%
X170380000Y-80025000D03*
D11*
X170380000Y-82565000D03*
%TD*%
D10*
%TO.C,JP3*%
X56300000Y-124460000D03*
D11*
X56300000Y-127000000D03*
X56300000Y-129539999D03*
%TD*%
D12*
%TO.C,H5*%
X203000000Y-128000000D03*
%TD*%
D10*
%TO.C,J5*%
X166700000Y-80025000D03*
D11*
X166700000Y-82565000D03*
%TD*%
D10*
%TO.C,J3*%
X102200000Y-71475000D03*
D11*
X102200000Y-74015000D03*
%TD*%
D13*
%TO.C,M1*%
X198010609Y-129930575D03*
X187010609Y-129930575D03*
D14*
X195010609Y-124930575D03*
D15*
X190010609Y-124930575D03*
%TD*%
D16*
%TO.C,R20*%
X160750000Y-70500000D03*
X158210000Y-67960000D03*
X155670001Y-70500000D03*
%TD*%
D12*
%TO.C,H3*%
X131000000Y-56000001D03*
%TD*%
%TO.C,H2*%
X51000000Y-128000000D03*
%TD*%
%TO.C,H6*%
X203000000Y-56000000D03*
%TD*%
D10*
%TO.C,J4*%
X96150000Y-71475000D03*
D11*
X96150000Y-74015000D03*
%TD*%
D10*
%TO.C,J17*%
X63560000Y-54800002D03*
D11*
X61020000Y-54800002D03*
X58480001Y-54800002D03*
X55940000Y-54800002D03*
%TD*%
D17*
%TO.C,SW3*%
X202500000Y-96050000D03*
D13*
X202500000Y-93550000D03*
X202500000Y-91050000D03*
X205800000Y-91050000D03*
X205800000Y-93550000D03*
X205800000Y-96050000D03*
%TD*%
D18*
%TO.C,J18*%
X73510000Y-125025000D03*
X79290000Y-125025000D03*
D19*
X72080000Y-124495000D03*
D20*
X72080000Y-128675000D03*
D19*
X80720000Y-124495000D03*
D20*
X80720000Y-128675000D03*
%TD*%
D10*
%TO.C,J16*%
X61369999Y-129875000D03*
D11*
X63909999Y-129875000D03*
X66449998Y-129875000D03*
X68989999Y-129875000D03*
%TD*%
D10*
%TO.C,J9*%
X100220000Y-125360000D03*
D11*
X100220000Y-127900000D03*
X97680000Y-125360000D03*
X97680000Y-127900000D03*
X95140001Y-125360000D03*
X95140000Y-127900000D03*
X92600000Y-125360000D03*
X92600000Y-127900000D03*
X90060000Y-125360000D03*
X90060000Y-127900000D03*
X87520000Y-125360000D03*
X87520000Y-127900000D03*
%TD*%
D12*
%TO.C,H4*%
X123000000Y-56000000D03*
%TD*%
D10*
%TO.C,J6*%
X177075000Y-83300000D03*
D11*
X174535000Y-83300000D03*
%TD*%
D16*
%TO.C,R30*%
X188250000Y-70500000D03*
X185710000Y-67960000D03*
X183170001Y-70500000D03*
%TD*%
D21*
%TO.C,SW2*%
X51617500Y-117500000D03*
D13*
X51617500Y-120000000D03*
X51617500Y-122500000D03*
X48317501Y-122500000D03*
X48317501Y-120000000D03*
X48317501Y-117500000D03*
%TD*%
%TO.C,M4*%
X135534999Y-129930575D03*
X124534999Y-129930575D03*
D14*
X132534999Y-124930575D03*
D15*
X127534999Y-124930575D03*
%TD*%
D22*
%TO.C,F3*%
X192750000Y-58000000D03*
X192750000Y-63200000D03*
D23*
X192750000Y-73300000D03*
X192750000Y-78500000D03*
%TD*%
D24*
%TO.C,BT1*%
X205350000Y-61250000D03*
X205350000Y-74750000D03*
D25*
X199350000Y-64400000D03*
D26*
X199350000Y-71600000D03*
%TD*%
D10*
%TO.C,JP6*%
X83800000Y-124600000D03*
D11*
X83800000Y-127140000D03*
X83800000Y-129679999D03*
%TD*%
D12*
%TO.C,H1*%
X51000000Y-56000000D03*
%TD*%
D10*
%TO.C,J2*%
X50081250Y-73570000D03*
D11*
X50081250Y-76110000D03*
X50081250Y-78649999D03*
X50081250Y-81190000D03*
%TD*%
D27*
%TO.C,U3*%
X53750000Y-95975000D03*
X55250000Y-95975000D03*
X53000000Y-95225000D03*
X54500000Y-95225000D03*
X56000000Y-95225000D03*
X53750000Y-94475000D03*
X55250000Y-94475000D03*
X53000000Y-93725001D03*
X54500000Y-93725001D03*
X56000000Y-93725000D03*
X53750000Y-92975001D03*
X55250000Y-92975000D03*
%TD*%
D10*
%TO.C,J8*%
X52340000Y-68680000D03*
D11*
X49800000Y-68680000D03*
X52340000Y-66140000D03*
X49800000Y-66140000D03*
X52340000Y-63600001D03*
X49800000Y-63600000D03*
X52340000Y-61060000D03*
X49800000Y-61060000D03*
%TD*%
D10*
%TO.C,JP2*%
X68620000Y-63060001D03*
D11*
X68620000Y-65600001D03*
X68620000Y-68140000D03*
%TD*%
D13*
%TO.C,M3*%
X115535000Y-129800475D03*
X104535000Y-129800475D03*
D14*
X112535000Y-124800475D03*
D15*
X107535000Y-124800475D03*
%TD*%
D13*
%TO.C,M2*%
X177010609Y-129930575D03*
X166010609Y-129930575D03*
D14*
X174010609Y-124930575D03*
D15*
X169010609Y-124930575D03*
%TD*%
D28*
%TO.C,D27*%
X57137500Y-64650001D03*
X57137500Y-65600000D03*
X57137500Y-66549999D03*
X54862500Y-66549999D03*
X54862500Y-64650001D03*
%TD*%
D29*
%TO.C,R9*%
X51770000Y-105192500D03*
X51770000Y-103542500D03*
%TD*%
D28*
%TO.C,D30*%
X63700000Y-125450001D03*
X63700000Y-126400000D03*
X63700000Y-127349999D03*
X61425000Y-127349999D03*
X61425000Y-125450001D03*
%TD*%
D30*
%TO.C,C17*%
X82551992Y-55076992D03*
X83648008Y-56173008D03*
%TD*%
D31*
%TO.C,C94*%
X150000000Y-114840000D03*
X150000000Y-115800000D03*
%TD*%
D32*
%TO.C,C92*%
X189472382Y-85479411D03*
X187922382Y-85479411D03*
%TD*%
D31*
%TO.C,C93*%
X127200000Y-70470000D03*
X127200000Y-71430000D03*
%TD*%
D33*
%TO.C,D15*%
X177800001Y-85620000D03*
X173799999Y-85620000D03*
%TD*%
D34*
%TO.C,D37*%
X75460000Y-126215000D03*
X77360000Y-126215000D03*
X76410000Y-128090001D03*
%TD*%
D35*
%TO.C,D10*%
X52503750Y-78124999D03*
X52503750Y-77175000D03*
X52503750Y-76225001D03*
X54778750Y-76225001D03*
X54778750Y-78124999D03*
%TD*%
D36*
%TO.C,D36*%
X77350000Y-123540000D03*
X75450000Y-123540000D03*
X76400000Y-121664999D03*
%TD*%
D35*
%TO.C,D31*%
X61242500Y-59350000D03*
X61242500Y-58400001D03*
X61242500Y-57450002D03*
X63517500Y-57450002D03*
X63517500Y-59350000D03*
%TD*%
D32*
%TO.C,C91*%
X189472382Y-83929412D03*
X187922382Y-83929412D03*
%TD*%
D30*
%TO.C,C15*%
X90101992Y-55201992D03*
X91198008Y-56298008D03*
%TD*%
D28*
%TO.C,D26*%
X57137500Y-61250001D03*
X57137500Y-62200000D03*
X57137500Y-63149999D03*
X54862500Y-63149999D03*
X54862500Y-61250001D03*
%TD*%
%TO.C,U17*%
X129937500Y-67550001D03*
X129937500Y-68500000D03*
X129937500Y-69449999D03*
X127662500Y-69449999D03*
X127662500Y-68500000D03*
X127662500Y-67550001D03*
%TD*%
D37*
%TO.C,C12*%
X50270000Y-103592500D03*
X50270000Y-105142500D03*
%TD*%
D30*
%TO.C,C19*%
X105251992Y-55251992D03*
X106348008Y-56348008D03*
%TD*%
D34*
%TO.C,D8*%
X114600000Y-56212500D03*
X116500000Y-56212500D03*
X115550000Y-58087501D03*
%TD*%
D35*
%TO.C,U16*%
X146262500Y-116799998D03*
X146262500Y-115849999D03*
X146262500Y-114900000D03*
X148537500Y-114900000D03*
X148537500Y-115849999D03*
X148537500Y-116799998D03*
%TD*%
D38*
%TO.C,U14*%
X186750000Y-77729412D03*
X187250001Y-77729412D03*
X187750000Y-77729412D03*
X188249999Y-77729412D03*
X188750000Y-77729412D03*
X188750000Y-82129412D03*
X188249999Y-82129412D03*
X187750000Y-82129412D03*
X187250001Y-82129412D03*
X186750000Y-82129412D03*
%TD*%
D30*
%TO.C,C18*%
X97400000Y-55400000D03*
X98496016Y-56496016D03*
%TD*%
D35*
%TO.C,D28*%
X94662500Y-123349999D03*
X94662500Y-122400000D03*
X94662500Y-121450001D03*
X96937500Y-121450001D03*
X96937500Y-123349999D03*
%TD*%
D30*
%TO.C,C16*%
X74651992Y-55251992D03*
X75748008Y-56348008D03*
%TD*%
D28*
%TO.C,D29*%
X91137500Y-121350001D03*
X91137500Y-122300000D03*
X91137500Y-123249999D03*
X88862500Y-123249999D03*
X88862500Y-121350001D03*
%TD*%
M02*

View File

@@ -0,0 +1,208 @@
%TF.GenerationSoftware,KiCad,Pcbnew,10.0.0*%
%TF.CreationDate,2026-04-16T08:54:22+12:00*%
%TF.ProjectId,esp32-racer,65737033-322d-4726-9163-65722e6b6963,rev?*%
%TF.SameCoordinates,Original*%
%TF.FileFunction,Paste,Bot*%
%TF.FilePolarity,Positive*%
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 10.0.0) date 2026-04-16 08:54:22*
%MOMM*%
%LPD*%
G01*
G04 APERTURE LIST*
G04 Aperture macros list*
%AMRoundRect*
0 Rectangle with rounded corners*
0 $1 Rounding radius*
0 $2 $3 $4 $5 $6 $7 $8 $9 X,Y pos of 4 corners*
0 Add a 4 corners polygon primitive as box body*
4,1,4,$2,$3,$4,$5,$6,$7,$8,$9,$2,$3,0*
0 Add four circle primitives for the rounded corners*
1,1,$1+$1,$2,$3*
1,1,$1+$1,$4,$5*
1,1,$1+$1,$6,$7*
1,1,$1+$1,$8,$9*
0 Add four rect primitives between the rounded corners*
20,1,$1+$1,$2,$3,$4,$5,0*
20,1,$1+$1,$4,$5,$6,$7,0*
20,1,$1+$1,$6,$7,$8,$9,0*
20,1,$1+$1,$8,$9,$2,$3,0*%
G04 Aperture macros list end*
%ADD10RoundRect,0.150000X0.512500X0.150000X-0.512500X0.150000X-0.512500X-0.150000X0.512500X-0.150000X0*%
%ADD11RoundRect,0.200000X0.275000X-0.200000X0.275000X0.200000X-0.275000X0.200000X-0.275000X-0.200000X0*%
%ADD12RoundRect,0.225000X-0.335876X-0.017678X-0.017678X-0.335876X0.335876X0.017678X0.017678X0.335876X0*%
%ADD13RoundRect,0.140000X-0.170000X0.140000X-0.170000X-0.140000X0.170000X-0.140000X0.170000X0.140000X0*%
%ADD14RoundRect,0.225000X0.225000X0.250000X-0.225000X0.250000X-0.225000X-0.250000X0.225000X-0.250000X0*%
%ADD15RoundRect,0.250000X1.000000X0.650000X-1.000000X0.650000X-1.000000X-0.650000X1.000000X-0.650000X0*%
%ADD16RoundRect,0.150000X-0.150000X0.587500X-0.150000X-0.587500X0.150000X-0.587500X0.150000X0.587500X0*%
%ADD17RoundRect,0.150000X-0.512500X-0.150000X0.512500X-0.150000X0.512500X0.150000X-0.512500X0.150000X0*%
%ADD18RoundRect,0.150000X0.150000X-0.587500X0.150000X0.587500X-0.150000X0.587500X-0.150000X-0.587500X0*%
%ADD19RoundRect,0.225000X-0.250000X0.225000X-0.250000X-0.225000X0.250000X-0.225000X0.250000X0.225000X0*%
%ADD20RoundRect,0.075000X-0.075000X0.650000X-0.075000X-0.650000X0.075000X-0.650000X0.075000X0.650000X0*%
G04 APERTURE END LIST*
D10*
%TO.C,D27*%
X57137500Y-64650001D03*
X57137500Y-65600000D03*
X57137500Y-66549999D03*
X54862500Y-66549999D03*
X54862500Y-64650001D03*
%TD*%
D11*
%TO.C,R9*%
X51770000Y-105192500D03*
X51770000Y-103542500D03*
%TD*%
D10*
%TO.C,D30*%
X63700000Y-125450001D03*
X63700000Y-126400000D03*
X63700000Y-127349999D03*
X61425000Y-127349999D03*
X61425000Y-125450001D03*
%TD*%
D12*
%TO.C,C17*%
X82551992Y-55076992D03*
X83648008Y-56173008D03*
%TD*%
D13*
%TO.C,C94*%
X150000000Y-114840000D03*
X150000000Y-115800000D03*
%TD*%
D14*
%TO.C,C92*%
X189472382Y-85479411D03*
X187922382Y-85479411D03*
%TD*%
D13*
%TO.C,C93*%
X127200000Y-70470000D03*
X127200000Y-71430000D03*
%TD*%
D15*
%TO.C,D15*%
X177800001Y-85620000D03*
X173799999Y-85620000D03*
%TD*%
D16*
%TO.C,D37*%
X75460000Y-126215000D03*
X77360000Y-126215000D03*
X76410000Y-128090001D03*
%TD*%
D17*
%TO.C,D10*%
X52503750Y-78124999D03*
X52503750Y-77175000D03*
X52503750Y-76225001D03*
X54778750Y-76225001D03*
X54778750Y-78124999D03*
%TD*%
D18*
%TO.C,D36*%
X77350000Y-123540000D03*
X75450000Y-123540000D03*
X76400000Y-121664999D03*
%TD*%
D17*
%TO.C,D31*%
X61242500Y-59350000D03*
X61242500Y-58400001D03*
X61242500Y-57450002D03*
X63517500Y-57450002D03*
X63517500Y-59350000D03*
%TD*%
D14*
%TO.C,C91*%
X189472382Y-83929412D03*
X187922382Y-83929412D03*
%TD*%
D12*
%TO.C,C15*%
X90101992Y-55201992D03*
X91198008Y-56298008D03*
%TD*%
D10*
%TO.C,D26*%
X57137500Y-61250001D03*
X57137500Y-62200000D03*
X57137500Y-63149999D03*
X54862500Y-63149999D03*
X54862500Y-61250001D03*
%TD*%
%TO.C,U17*%
X129937500Y-67550001D03*
X129937500Y-68500000D03*
X129937500Y-69449999D03*
X127662500Y-69449999D03*
X127662500Y-68500000D03*
X127662500Y-67550001D03*
%TD*%
D19*
%TO.C,C12*%
X50270000Y-103592500D03*
X50270000Y-105142500D03*
%TD*%
D12*
%TO.C,C19*%
X105251992Y-55251992D03*
X106348008Y-56348008D03*
%TD*%
D16*
%TO.C,D8*%
X114600000Y-56212500D03*
X116500000Y-56212500D03*
X115550000Y-58087501D03*
%TD*%
D17*
%TO.C,U16*%
X146262500Y-116799998D03*
X146262500Y-115849999D03*
X146262500Y-114900000D03*
X148537500Y-114900000D03*
X148537500Y-115849999D03*
X148537500Y-116799998D03*
%TD*%
D20*
%TO.C,U14*%
X186750000Y-77729412D03*
X187250001Y-77729412D03*
X187750000Y-77729412D03*
X188249999Y-77729412D03*
X188750000Y-77729412D03*
X188750000Y-82129412D03*
X188249999Y-82129412D03*
X187750000Y-82129412D03*
X187250001Y-82129412D03*
X186750000Y-82129412D03*
%TD*%
D12*
%TO.C,C18*%
X97400000Y-55400000D03*
X98496016Y-56496016D03*
%TD*%
D17*
%TO.C,D28*%
X94662500Y-123349999D03*
X94662500Y-122400000D03*
X94662500Y-121450001D03*
X96937500Y-121450001D03*
X96937500Y-123349999D03*
%TD*%
D12*
%TO.C,C16*%
X74651992Y-55251992D03*
X75748008Y-56348008D03*
%TD*%
D10*
%TO.C,D29*%
X91137500Y-121350001D03*
X91137500Y-122300000D03*
X91137500Y-123249999D03*
X88862500Y-123249999D03*
X88862500Y-121350001D03*
%TD*%
M02*

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,40 @@
%TF.GenerationSoftware,KiCad,Pcbnew,10.0.0*%
%TF.CreationDate,2026-04-16T08:54:22+12:00*%
%TF.ProjectId,esp32-racer,65737033-322d-4726-9163-65722e6b6963,rev?*%
%TF.SameCoordinates,Original*%
%TF.FileFunction,Profile,NP*%
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 10.0.0) date 2026-04-16 08:54:22*
%MOMM*%
%LPD*%
G01*
G04 APERTURE LIST*
%TA.AperFunction,Profile*%
%ADD10C,0.050000*%
%TD*%
G04 APERTURE END LIST*
D10*
X47000000Y-56000000D02*
X47000000Y-56000000D01*
G75*
G02*
X51000000Y-52000000I4000000J0D01*
G01*
X202999999Y-52000000D01*
G75*
G02*
X206999999Y-56000000I1J-4000000D01*
G01*
X206999999Y-128000000D01*
G75*
G02*
X202999999Y-132000000I-3999999J0D01*
G01*
X51000000Y-132000000D01*
G75*
G02*
X47000000Y-128000000I0J4000000D01*
G01*
X47000000Y-56000000D01*
M02*

39870
PCBs/esp32-racer-F_Cu.gbr Normal file

File diff suppressed because it is too large Load Diff

2103
PCBs/esp32-racer-F_Mask.gbr Normal file

File diff suppressed because it is too large Load Diff

1855
PCBs/esp32-racer-F_Paste.gbr Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

26907
PCBs/esp32-racer-In1_Cu.gbr Normal file

File diff suppressed because it is too large Load Diff

68369
PCBs/esp32-racer-In2_Cu.gbr Normal file

File diff suppressed because it is too large Load Diff

17
PCBs/esp32-racer-NPTH.drl Normal file
View File

@@ -0,0 +1,17 @@
M48
; DRILL file KiCad 10.0.0 date 2026-04-16T08:54:47
; FORMAT={-:-/ absolute / metric / decimal}
; #@! TF.CreationDate,2026-04-16T08:54:47+12:00
; #@! TF.GenerationSoftware,Kicad,Pcbnew,10.0.0
; #@! TF.FileFunction,NonPlated,1,4,NPTH
FMAT,2
METRIC
; #@! TA.AperFunction,NonPlated,NPTH,ComponentDrill
T1C0.650
%
G90
G05
T1
X73.51Y-125.025
X79.29Y-125.025
M30

2372
PCBs/esp32-racer-PTH.drl Normal file

File diff suppressed because it is too large Load Diff

170
PCBs/esp32-racer-job.gbrjob Normal file
View File

@@ -0,0 +1,170 @@
{
"Header": {
"GenerationSoftware": {
"Vendor": "KiCad",
"Application": "Pcbnew",
"Version": "10.0.0"
},
"CreationDate": "2026-04-16T08:54:22+12:00"
},
"GeneralSpecs": {
"ProjectId": {
"Name": "esp32-racer",
"GUID": "65737033-322d-4726-9163-65722e6b6963",
"Revision": "rev?"
},
"Size": {
"X": 160.05,
"Y": 80.05
},
"LayerNumber": 4,
"BoardThickness": 1.6,
"Finish": "None"
},
"DesignRules": [
{
"Layers": "Outer",
"PadToPad": 0.2,
"PadToTrack": 0.2,
"TrackToTrack": 0.2,
"MinLineWidth": 0.2,
"TrackToRegion": 0.2,
"RegionToRegion": 0.2
},
{
"Layers": "Inner",
"PadToPad": 0.0,
"PadToTrack": 0.0,
"TrackToTrack": 0.2,
"MinLineWidth": 0.2,
"TrackToRegion": 0.2,
"RegionToRegion": 0.2
}
],
"FilesAttributes": [
{
"Path": "esp32-racer-F_Cu.gbr",
"FileFunction": "Copper,L1,Top",
"FilePolarity": "Positive"
},
{
"Path": "esp32-racer-In1_Cu.gbr",
"FileFunction": "Copper,L2,Inr",
"FilePolarity": "Positive"
},
{
"Path": "esp32-racer-In2_Cu.gbr",
"FileFunction": "Copper,L3,Inr",
"FilePolarity": "Positive"
},
{
"Path": "esp32-racer-B_Cu.gbr",
"FileFunction": "Copper,L4,Bot",
"FilePolarity": "Positive"
},
{
"Path": "esp32-racer-F_Paste.gbr",
"FileFunction": "SolderPaste,Top",
"FilePolarity": "Positive"
},
{
"Path": "esp32-racer-B_Paste.gbr",
"FileFunction": "SolderPaste,Bot",
"FilePolarity": "Positive"
},
{
"Path": "esp32-racer-F_Silkscreen.gbr",
"FileFunction": "Legend,Top",
"FilePolarity": "Positive"
},
{
"Path": "esp32-racer-B_Silkscreen.gbr",
"FileFunction": "Legend,Bot",
"FilePolarity": "Positive"
},
{
"Path": "esp32-racer-F_Mask.gbr",
"FileFunction": "SolderMask,Top",
"FilePolarity": "Negative"
},
{
"Path": "esp32-racer-B_Mask.gbr",
"FileFunction": "SolderMask,Bot",
"FilePolarity": "Negative"
},
{
"Path": "esp32-racer-Edge_Cuts.gbr",
"FileFunction": "Profile",
"FilePolarity": "Positive"
}
],
"MaterialStackup": [
{
"Type": "Legend",
"Name": "Top Silk Screen"
},
{
"Type": "SolderPaste",
"Name": "Top Solder Paste"
},
{
"Type": "SolderMask",
"Thickness": 0.01,
"Name": "Top Solder Mask"
},
{
"Type": "Copper",
"Thickness": 0.035,
"Name": "F.Cu"
},
{
"Type": "Dielectric",
"Thickness": 0.1,
"Material": "FR4",
"Name": "F.Cu/In1.Cu",
"Notes": "Type: dielectric layer 1 (from F.Cu to In1.Cu)"
},
{
"Type": "Copper",
"Thickness": 0.035,
"Name": "In1.Cu"
},
{
"Type": "Dielectric",
"Thickness": 1.24,
"Material": "FR4",
"Name": "In1.Cu/In2.Cu",
"Notes": "Type: dielectric layer 2 (from In1.Cu to In2.Cu)"
},
{
"Type": "Copper",
"Thickness": 0.035,
"Name": "In2.Cu"
},
{
"Type": "Dielectric",
"Thickness": 0.1,
"Material": "FR4",
"Name": "In2.Cu/B.Cu",
"Notes": "Type: dielectric layer 3 (from In2.Cu to B.Cu)"
},
{
"Type": "Copper",
"Thickness": 0.035,
"Name": "B.Cu"
},
{
"Type": "SolderMask",
"Thickness": 0.01,
"Name": "Bottom Solder Mask"
},
{
"Type": "SolderPaste",
"Name": "Bottom Solder Paste"
},
{
"Type": "Legend",
"Name": "Bottom Silk Screen"
}
]
}

BIN
PCBs/esp32-racer.zip Normal file

Binary file not shown.

25839
PCBs/old/esp32-racer-B_Cu.gbr Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,477 @@
%TF.GenerationSoftware,KiCad,Pcbnew,10.0.0*%
%TF.CreationDate,2026-04-15T11:42:02+12:00*%
%TF.ProjectId,esp32-racer,65737033-322d-4726-9163-65722e6b6963,rev?*%
%TF.SameCoordinates,Original*%
%TF.FileFunction,Soldermask,Bot*%
%TF.FilePolarity,Negative*%
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 10.0.0) date 2026-04-15 11:42:02*
%MOMM*%
%LPD*%
G01*
G04 APERTURE LIST*
G04 Aperture macros list*
%AMRoundRect*
0 Rectangle with rounded corners*
0 $1 Rounding radius*
0 $2 $3 $4 $5 $6 $7 $8 $9 X,Y pos of 4 corners*
0 Add a 4 corners polygon primitive as box body*
4,1,4,$2,$3,$4,$5,$6,$7,$8,$9,$2,$3,0*
0 Add four circle primitives for the rounded corners*
1,1,$1+$1,$2,$3*
1,1,$1+$1,$4,$5*
1,1,$1+$1,$6,$7*
1,1,$1+$1,$8,$9*
0 Add four rect primitives between the rounded corners*
20,1,$1+$1,$2,$3,$4,$5,0*
20,1,$1+$1,$4,$5,$6,$7,0*
20,1,$1+$1,$6,$7,$8,$9,0*
20,1,$1+$1,$8,$9,$2,$3,0*%
G04 Aperture macros list end*
%ADD10R,1.700000X1.700000*%
%ADD11C,1.700000*%
%ADD12C,5.600000*%
%ADD13C,1.400000*%
%ADD14RoundRect,0.770000X0.980000X0.980000X-0.980000X0.980000X-0.980000X-0.980000X0.980000X-0.980000X0*%
%ADD15C,3.500000*%
%ADD16C,1.440000*%
%ADD17RoundRect,0.250000X0.450000X-0.450000X0.450000X0.450000X-0.450000X0.450000X-0.450000X-0.450000X0*%
%ADD18C,0.650000*%
%ADD19O,1.000000X2.100000*%
%ADD20O,1.000000X1.600000*%
%ADD21RoundRect,0.250000X-0.450000X0.450000X-0.450000X-0.450000X0.450000X-0.450000X0.450000X0.450000X0*%
%ADD22RoundRect,0.575000X-0.575000X0.575000X-0.575000X-0.575000X0.575000X-0.575000X0.575000X0.575000X0*%
%ADD23C,2.300000*%
%ADD24R,2.000000X0.900000*%
%ADD25C,4.100000*%
%ADD26RoundRect,1.025000X-1.025000X1.025000X-1.025000X-1.025000X1.025000X-1.025000X1.025000X1.025000X0*%
%ADD27C,0.600000*%
%ADD28RoundRect,0.150000X0.512500X0.150000X-0.512500X0.150000X-0.512500X-0.150000X0.512500X-0.150000X0*%
%ADD29RoundRect,0.200000X0.275000X-0.200000X0.275000X0.200000X-0.275000X0.200000X-0.275000X-0.200000X0*%
%ADD30RoundRect,0.225000X-0.335876X-0.017678X-0.017678X-0.335876X0.335876X0.017678X0.017678X0.335876X0*%
%ADD31RoundRect,0.140000X-0.170000X0.140000X-0.170000X-0.140000X0.170000X-0.140000X0.170000X0.140000X0*%
%ADD32RoundRect,0.225000X0.225000X0.250000X-0.225000X0.250000X-0.225000X-0.250000X0.225000X-0.250000X0*%
%ADD33RoundRect,0.250000X1.000000X0.650000X-1.000000X0.650000X-1.000000X-0.650000X1.000000X-0.650000X0*%
%ADD34RoundRect,0.150000X-0.150000X0.587500X-0.150000X-0.587500X0.150000X-0.587500X0.150000X0.587500X0*%
%ADD35RoundRect,0.150000X-0.512500X-0.150000X0.512500X-0.150000X0.512500X0.150000X-0.512500X0.150000X0*%
%ADD36RoundRect,0.150000X0.150000X-0.587500X0.150000X0.587500X-0.150000X0.587500X-0.150000X-0.587500X0*%
%ADD37RoundRect,0.225000X-0.250000X0.225000X-0.250000X-0.225000X0.250000X-0.225000X0.250000X0.225000X0*%
%ADD38RoundRect,0.075000X-0.075000X0.650000X-0.075000X-0.650000X0.075000X-0.650000X0.075000X0.650000X0*%
G04 APERTURE END LIST*
D10*
%TO.C,J1*%
X116550000Y-54300000D03*
D11*
X114010000Y-54300000D03*
X111470001Y-54300000D03*
%TD*%
D10*
%TO.C,JP1*%
X92670001Y-113308214D03*
D11*
X92670001Y-110768214D03*
X92670001Y-108228215D03*
%TD*%
D10*
%TO.C,J7*%
X170380000Y-80025000D03*
D11*
X170380000Y-82565000D03*
%TD*%
D10*
%TO.C,JP3*%
X56300000Y-124460000D03*
D11*
X56300000Y-127000000D03*
X56300000Y-129539999D03*
%TD*%
D12*
%TO.C,H5*%
X203000000Y-128000000D03*
%TD*%
D10*
%TO.C,J5*%
X166700000Y-80025000D03*
D11*
X166700000Y-82565000D03*
%TD*%
D10*
%TO.C,J3*%
X102200000Y-71475000D03*
D11*
X102200000Y-74015000D03*
%TD*%
D13*
%TO.C,M1*%
X198010609Y-129930575D03*
X187010609Y-129930575D03*
D14*
X195010609Y-124930575D03*
D15*
X190010609Y-124930575D03*
%TD*%
D16*
%TO.C,R20*%
X160750000Y-70500000D03*
X158210000Y-67960000D03*
X155670001Y-70500000D03*
%TD*%
D12*
%TO.C,H3*%
X131000000Y-56000001D03*
%TD*%
%TO.C,H2*%
X51000000Y-128000000D03*
%TD*%
%TO.C,H6*%
X203000000Y-56000000D03*
%TD*%
D10*
%TO.C,J4*%
X96150000Y-71475000D03*
D11*
X96150000Y-74015000D03*
%TD*%
D10*
%TO.C,J17*%
X63560000Y-54800002D03*
D11*
X61020000Y-54800002D03*
X58480001Y-54800002D03*
X55940000Y-54800002D03*
%TD*%
D17*
%TO.C,SW3*%
X202500000Y-96050000D03*
D13*
X202500000Y-93550000D03*
X202500000Y-91050000D03*
X205800000Y-91050000D03*
X205800000Y-93550000D03*
X205800000Y-96050000D03*
%TD*%
D18*
%TO.C,J18*%
X73510000Y-125025000D03*
X79290000Y-125025000D03*
D19*
X72080000Y-124495000D03*
D20*
X72080000Y-128675000D03*
D19*
X80720000Y-124495000D03*
D20*
X80720000Y-128675000D03*
%TD*%
D10*
%TO.C,J16*%
X61369999Y-129875000D03*
D11*
X63909999Y-129875000D03*
X66449998Y-129875000D03*
X68989999Y-129875000D03*
%TD*%
D10*
%TO.C,J9*%
X100220000Y-125360000D03*
D11*
X100220000Y-127900000D03*
X97680000Y-125360000D03*
X97680000Y-127900000D03*
X95140001Y-125360000D03*
X95140000Y-127900000D03*
X92600000Y-125360000D03*
X92600000Y-127900000D03*
X90060000Y-125360000D03*
X90060000Y-127900000D03*
X87520000Y-125360000D03*
X87520000Y-127900000D03*
%TD*%
D12*
%TO.C,H4*%
X123000000Y-56000000D03*
%TD*%
D10*
%TO.C,J6*%
X177075000Y-83300000D03*
D11*
X174535000Y-83300000D03*
%TD*%
D16*
%TO.C,R30*%
X188250000Y-70500000D03*
X185710000Y-67960000D03*
X183170001Y-70500000D03*
%TD*%
D21*
%TO.C,SW2*%
X51617500Y-117500000D03*
D13*
X51617500Y-120000000D03*
X51617500Y-122500000D03*
X48317501Y-122500000D03*
X48317501Y-120000000D03*
X48317501Y-117500000D03*
%TD*%
%TO.C,M4*%
X135534999Y-129930575D03*
X124534999Y-129930575D03*
D14*
X132534999Y-124930575D03*
D15*
X127534999Y-124930575D03*
%TD*%
D22*
%TO.C,F3*%
X192750000Y-58000000D03*
X192750000Y-63200000D03*
D23*
X192750000Y-73300000D03*
X192750000Y-78500000D03*
%TD*%
D24*
%TO.C,BT1*%
X205350000Y-61250000D03*
X205350000Y-74750000D03*
D25*
X199350000Y-64400000D03*
D26*
X199350000Y-71600000D03*
%TD*%
D10*
%TO.C,JP6*%
X83800000Y-124600000D03*
D11*
X83800000Y-127140000D03*
X83800000Y-129679999D03*
%TD*%
D12*
%TO.C,H1*%
X51000000Y-56000000D03*
%TD*%
D10*
%TO.C,J2*%
X50081250Y-73570000D03*
D11*
X50081250Y-76110000D03*
X50081250Y-78649999D03*
X50081250Y-81190000D03*
%TD*%
D27*
%TO.C,U3*%
X53750000Y-95975000D03*
X55250000Y-95975000D03*
X53000000Y-95225000D03*
X54500000Y-95225000D03*
X56000000Y-95225000D03*
X53750000Y-94475000D03*
X55250000Y-94475000D03*
X53000000Y-93725001D03*
X54500000Y-93725001D03*
X56000000Y-93725000D03*
X53750000Y-92975001D03*
X55250000Y-92975000D03*
%TD*%
D10*
%TO.C,J8*%
X52340000Y-68680000D03*
D11*
X49800000Y-68680000D03*
X52340000Y-66140000D03*
X49800000Y-66140000D03*
X52340000Y-63600001D03*
X49800000Y-63600000D03*
X52340000Y-61060000D03*
X49800000Y-61060000D03*
%TD*%
D10*
%TO.C,JP2*%
X68620000Y-63060001D03*
D11*
X68620000Y-65600001D03*
X68620000Y-68140000D03*
%TD*%
D13*
%TO.C,M3*%
X115535000Y-129800475D03*
X104535000Y-129800475D03*
D14*
X112535000Y-124800475D03*
D15*
X107535000Y-124800475D03*
%TD*%
D13*
%TO.C,M2*%
X177010609Y-129930575D03*
X166010609Y-129930575D03*
D14*
X174010609Y-124930575D03*
D15*
X169010609Y-124930575D03*
%TD*%
D28*
%TO.C,D27*%
X57137500Y-64650001D03*
X57137500Y-65600000D03*
X57137500Y-66549999D03*
X54862500Y-66549999D03*
X54862500Y-64650001D03*
%TD*%
D29*
%TO.C,R9*%
X51770000Y-105192500D03*
X51770000Y-103542500D03*
%TD*%
D28*
%TO.C,D30*%
X63700000Y-125450001D03*
X63700000Y-126400000D03*
X63700000Y-127349999D03*
X61425000Y-127349999D03*
X61425000Y-125450001D03*
%TD*%
D30*
%TO.C,C17*%
X82551992Y-55076992D03*
X83648008Y-56173008D03*
%TD*%
D31*
%TO.C,C94*%
X150000000Y-114840000D03*
X150000000Y-115800000D03*
%TD*%
D32*
%TO.C,C92*%
X189472382Y-85479411D03*
X187922382Y-85479411D03*
%TD*%
D31*
%TO.C,C93*%
X127200000Y-70470000D03*
X127200000Y-71430000D03*
%TD*%
D33*
%TO.C,D15*%
X177800001Y-85620000D03*
X173799999Y-85620000D03*
%TD*%
D34*
%TO.C,D37*%
X75460000Y-126215000D03*
X77360000Y-126215000D03*
X76410000Y-128090001D03*
%TD*%
D35*
%TO.C,D10*%
X52503750Y-78124999D03*
X52503750Y-77175000D03*
X52503750Y-76225001D03*
X54778750Y-76225001D03*
X54778750Y-78124999D03*
%TD*%
D36*
%TO.C,D36*%
X77350000Y-123540000D03*
X75450000Y-123540000D03*
X76400000Y-121664999D03*
%TD*%
D35*
%TO.C,D31*%
X61242500Y-59350000D03*
X61242500Y-58400001D03*
X61242500Y-57450002D03*
X63517500Y-57450002D03*
X63517500Y-59350000D03*
%TD*%
D32*
%TO.C,C91*%
X189472382Y-83929412D03*
X187922382Y-83929412D03*
%TD*%
D30*
%TO.C,C15*%
X90101992Y-55201992D03*
X91198008Y-56298008D03*
%TD*%
D28*
%TO.C,D26*%
X57137500Y-61250001D03*
X57137500Y-62200000D03*
X57137500Y-63149999D03*
X54862500Y-63149999D03*
X54862500Y-61250001D03*
%TD*%
%TO.C,U17*%
X129937500Y-67550001D03*
X129937500Y-68500000D03*
X129937500Y-69449999D03*
X127662500Y-69449999D03*
X127662500Y-68500000D03*
X127662500Y-67550001D03*
%TD*%
D37*
%TO.C,C12*%
X50270000Y-103592500D03*
X50270000Y-105142500D03*
%TD*%
D30*
%TO.C,C19*%
X105251992Y-55251992D03*
X106348008Y-56348008D03*
%TD*%
D34*
%TO.C,D8*%
X114600000Y-56212500D03*
X116500000Y-56212500D03*
X115550000Y-58087501D03*
%TD*%
D35*
%TO.C,U16*%
X146262500Y-116799998D03*
X146262500Y-115849999D03*
X146262500Y-114900000D03*
X148537500Y-114900000D03*
X148537500Y-115849999D03*
X148537500Y-116799998D03*
%TD*%
D38*
%TO.C,U14*%
X186750000Y-77729412D03*
X187250001Y-77729412D03*
X187750000Y-77729412D03*
X188249999Y-77729412D03*
X188750000Y-77729412D03*
X188750000Y-82129412D03*
X188249999Y-82129412D03*
X187750000Y-82129412D03*
X187250001Y-82129412D03*
X186750000Y-82129412D03*
%TD*%
D30*
%TO.C,C18*%
X97400000Y-55400000D03*
X98496016Y-56496016D03*
%TD*%
D35*
%TO.C,D28*%
X94662500Y-123349999D03*
X94662500Y-122400000D03*
X94662500Y-121450001D03*
X96937500Y-121450001D03*
X96937500Y-123349999D03*
%TD*%
D30*
%TO.C,C16*%
X74651992Y-55251992D03*
X75748008Y-56348008D03*
%TD*%
D28*
%TO.C,D29*%
X91137500Y-121350001D03*
X91137500Y-122300000D03*
X91137500Y-123249999D03*
X88862500Y-123249999D03*
X88862500Y-121350001D03*
%TD*%
M02*

View File

@@ -0,0 +1,208 @@
%TF.GenerationSoftware,KiCad,Pcbnew,10.0.0*%
%TF.CreationDate,2026-04-15T11:42:02+12:00*%
%TF.ProjectId,esp32-racer,65737033-322d-4726-9163-65722e6b6963,rev?*%
%TF.SameCoordinates,Original*%
%TF.FileFunction,Paste,Bot*%
%TF.FilePolarity,Positive*%
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 10.0.0) date 2026-04-15 11:42:02*
%MOMM*%
%LPD*%
G01*
G04 APERTURE LIST*
G04 Aperture macros list*
%AMRoundRect*
0 Rectangle with rounded corners*
0 $1 Rounding radius*
0 $2 $3 $4 $5 $6 $7 $8 $9 X,Y pos of 4 corners*
0 Add a 4 corners polygon primitive as box body*
4,1,4,$2,$3,$4,$5,$6,$7,$8,$9,$2,$3,0*
0 Add four circle primitives for the rounded corners*
1,1,$1+$1,$2,$3*
1,1,$1+$1,$4,$5*
1,1,$1+$1,$6,$7*
1,1,$1+$1,$8,$9*
0 Add four rect primitives between the rounded corners*
20,1,$1+$1,$2,$3,$4,$5,0*
20,1,$1+$1,$4,$5,$6,$7,0*
20,1,$1+$1,$6,$7,$8,$9,0*
20,1,$1+$1,$8,$9,$2,$3,0*%
G04 Aperture macros list end*
%ADD10RoundRect,0.150000X0.512500X0.150000X-0.512500X0.150000X-0.512500X-0.150000X0.512500X-0.150000X0*%
%ADD11RoundRect,0.200000X0.275000X-0.200000X0.275000X0.200000X-0.275000X0.200000X-0.275000X-0.200000X0*%
%ADD12RoundRect,0.225000X-0.335876X-0.017678X-0.017678X-0.335876X0.335876X0.017678X0.017678X0.335876X0*%
%ADD13RoundRect,0.140000X-0.170000X0.140000X-0.170000X-0.140000X0.170000X-0.140000X0.170000X0.140000X0*%
%ADD14RoundRect,0.225000X0.225000X0.250000X-0.225000X0.250000X-0.225000X-0.250000X0.225000X-0.250000X0*%
%ADD15RoundRect,0.250000X1.000000X0.650000X-1.000000X0.650000X-1.000000X-0.650000X1.000000X-0.650000X0*%
%ADD16RoundRect,0.150000X-0.150000X0.587500X-0.150000X-0.587500X0.150000X-0.587500X0.150000X0.587500X0*%
%ADD17RoundRect,0.150000X-0.512500X-0.150000X0.512500X-0.150000X0.512500X0.150000X-0.512500X0.150000X0*%
%ADD18RoundRect,0.150000X0.150000X-0.587500X0.150000X0.587500X-0.150000X0.587500X-0.150000X-0.587500X0*%
%ADD19RoundRect,0.225000X-0.250000X0.225000X-0.250000X-0.225000X0.250000X-0.225000X0.250000X0.225000X0*%
%ADD20RoundRect,0.075000X-0.075000X0.650000X-0.075000X-0.650000X0.075000X-0.650000X0.075000X0.650000X0*%
G04 APERTURE END LIST*
D10*
%TO.C,D27*%
X57137500Y-64650001D03*
X57137500Y-65600000D03*
X57137500Y-66549999D03*
X54862500Y-66549999D03*
X54862500Y-64650001D03*
%TD*%
D11*
%TO.C,R9*%
X51770000Y-105192500D03*
X51770000Y-103542500D03*
%TD*%
D10*
%TO.C,D30*%
X63700000Y-125450001D03*
X63700000Y-126400000D03*
X63700000Y-127349999D03*
X61425000Y-127349999D03*
X61425000Y-125450001D03*
%TD*%
D12*
%TO.C,C17*%
X82551992Y-55076992D03*
X83648008Y-56173008D03*
%TD*%
D13*
%TO.C,C94*%
X150000000Y-114840000D03*
X150000000Y-115800000D03*
%TD*%
D14*
%TO.C,C92*%
X189472382Y-85479411D03*
X187922382Y-85479411D03*
%TD*%
D13*
%TO.C,C93*%
X127200000Y-70470000D03*
X127200000Y-71430000D03*
%TD*%
D15*
%TO.C,D15*%
X177800001Y-85620000D03*
X173799999Y-85620000D03*
%TD*%
D16*
%TO.C,D37*%
X75460000Y-126215000D03*
X77360000Y-126215000D03*
X76410000Y-128090001D03*
%TD*%
D17*
%TO.C,D10*%
X52503750Y-78124999D03*
X52503750Y-77175000D03*
X52503750Y-76225001D03*
X54778750Y-76225001D03*
X54778750Y-78124999D03*
%TD*%
D18*
%TO.C,D36*%
X77350000Y-123540000D03*
X75450000Y-123540000D03*
X76400000Y-121664999D03*
%TD*%
D17*
%TO.C,D31*%
X61242500Y-59350000D03*
X61242500Y-58400001D03*
X61242500Y-57450002D03*
X63517500Y-57450002D03*
X63517500Y-59350000D03*
%TD*%
D14*
%TO.C,C91*%
X189472382Y-83929412D03*
X187922382Y-83929412D03*
%TD*%
D12*
%TO.C,C15*%
X90101992Y-55201992D03*
X91198008Y-56298008D03*
%TD*%
D10*
%TO.C,D26*%
X57137500Y-61250001D03*
X57137500Y-62200000D03*
X57137500Y-63149999D03*
X54862500Y-63149999D03*
X54862500Y-61250001D03*
%TD*%
%TO.C,U17*%
X129937500Y-67550001D03*
X129937500Y-68500000D03*
X129937500Y-69449999D03*
X127662500Y-69449999D03*
X127662500Y-68500000D03*
X127662500Y-67550001D03*
%TD*%
D19*
%TO.C,C12*%
X50270000Y-103592500D03*
X50270000Y-105142500D03*
%TD*%
D12*
%TO.C,C19*%
X105251992Y-55251992D03*
X106348008Y-56348008D03*
%TD*%
D16*
%TO.C,D8*%
X114600000Y-56212500D03*
X116500000Y-56212500D03*
X115550000Y-58087501D03*
%TD*%
D17*
%TO.C,U16*%
X146262500Y-116799998D03*
X146262500Y-115849999D03*
X146262500Y-114900000D03*
X148537500Y-114900000D03*
X148537500Y-115849999D03*
X148537500Y-116799998D03*
%TD*%
D20*
%TO.C,U14*%
X186750000Y-77729412D03*
X187250001Y-77729412D03*
X187750000Y-77729412D03*
X188249999Y-77729412D03*
X188750000Y-77729412D03*
X188750000Y-82129412D03*
X188249999Y-82129412D03*
X187750000Y-82129412D03*
X187250001Y-82129412D03*
X186750000Y-82129412D03*
%TD*%
D12*
%TO.C,C18*%
X97400000Y-55400000D03*
X98496016Y-56496016D03*
%TD*%
D17*
%TO.C,D28*%
X94662500Y-123349999D03*
X94662500Y-122400000D03*
X94662500Y-121450001D03*
X96937500Y-121450001D03*
X96937500Y-123349999D03*
%TD*%
D12*
%TO.C,C16*%
X74651992Y-55251992D03*
X75748008Y-56348008D03*
%TD*%
D10*
%TO.C,D29*%
X91137500Y-121350001D03*
X91137500Y-122300000D03*
X91137500Y-123249999D03*
X88862500Y-123249999D03*
X88862500Y-121350001D03*
%TD*%
M02*

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,40 @@
%TF.GenerationSoftware,KiCad,Pcbnew,10.0.0*%
%TF.CreationDate,2026-04-15T11:42:03+12:00*%
%TF.ProjectId,esp32-racer,65737033-322d-4726-9163-65722e6b6963,rev?*%
%TF.SameCoordinates,Original*%
%TF.FileFunction,Profile,NP*%
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 10.0.0) date 2026-04-15 11:42:03*
%MOMM*%
%LPD*%
G01*
G04 APERTURE LIST*
%TA.AperFunction,Profile*%
%ADD10C,0.050000*%
%TD*%
G04 APERTURE END LIST*
D10*
X47000000Y-56000000D02*
X47000000Y-56000000D01*
G75*
G02*
X51000000Y-52000000I4000000J0D01*
G01*
X202999999Y-52000000D01*
G75*
G02*
X206999999Y-56000000I1J-4000000D01*
G01*
X206999999Y-128000000D01*
G75*
G02*
X202999999Y-132000000I-3999999J0D01*
G01*
X51000000Y-132000000D01*
G75*
G02*
X47000000Y-128000000I0J4000000D01*
G01*
X47000000Y-56000000D01*
M02*

Binary file not shown.

41322
PCBs/old/esp32-racer-F_Cu.gbr Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,17 @@
M48
; DRILL file KiCad 10.0.0 date 2026-04-15T11:42:13
; FORMAT={-:-/ absolute / metric / decimal}
; #@! TF.CreationDate,2026-04-15T11:42:13+12:00
; #@! TF.GenerationSoftware,Kicad,Pcbnew,10.0.0
; #@! TF.FileFunction,NonPlated,1,4,NPTH
FMAT,2
METRIC
; #@! TA.AperFunction,NonPlated,NPTH,ComponentDrill
T1C0.650
%
G90
G05
T1
X73.51Y-125.025
X79.29Y-125.025
M30

2400
PCBs/old/esp32-racer-PTH.drl Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,170 @@
{
"Header": {
"GenerationSoftware": {
"Vendor": "KiCad",
"Application": "Pcbnew",
"Version": "10.0.0"
},
"CreationDate": "2026-04-15T11:42:03+12:00"
},
"GeneralSpecs": {
"ProjectId": {
"Name": "esp32-racer",
"GUID": "65737033-322d-4726-9163-65722e6b6963",
"Revision": "rev?"
},
"Size": {
"X": 160.05,
"Y": 80.05
},
"LayerNumber": 4,
"BoardThickness": 1.6,
"Finish": "None"
},
"DesignRules": [
{
"Layers": "Outer",
"PadToPad": 0.2,
"PadToTrack": 0.2,
"TrackToTrack": 0.2,
"MinLineWidth": 0.2,
"TrackToRegion": 0.2,
"RegionToRegion": 0.2
},
{
"Layers": "Inner",
"PadToPad": 0.0,
"PadToTrack": 0.0,
"TrackToTrack": 0.2,
"MinLineWidth": 0.2,
"TrackToRegion": 0.2,
"RegionToRegion": 0.2
}
],
"FilesAttributes": [
{
"Path": "esp32-racer-F_Cu.gbr",
"FileFunction": "Copper,L1,Top",
"FilePolarity": "Positive"
},
{
"Path": "esp32-racer-In1_Cu.gbr",
"FileFunction": "Copper,L2,Inr",
"FilePolarity": "Positive"
},
{
"Path": "esp32-racer-In2_Cu.gbr",
"FileFunction": "Copper,L3,Inr",
"FilePolarity": "Positive"
},
{
"Path": "esp32-racer-B_Cu.gbr",
"FileFunction": "Copper,L4,Bot",
"FilePolarity": "Positive"
},
{
"Path": "esp32-racer-F_Paste.gbr",
"FileFunction": "SolderPaste,Top",
"FilePolarity": "Positive"
},
{
"Path": "esp32-racer-B_Paste.gbr",
"FileFunction": "SolderPaste,Bot",
"FilePolarity": "Positive"
},
{
"Path": "esp32-racer-F_Silkscreen.gbr",
"FileFunction": "Legend,Top",
"FilePolarity": "Positive"
},
{
"Path": "esp32-racer-B_Silkscreen.gbr",
"FileFunction": "Legend,Bot",
"FilePolarity": "Positive"
},
{
"Path": "esp32-racer-F_Mask.gbr",
"FileFunction": "SolderMask,Top",
"FilePolarity": "Negative"
},
{
"Path": "esp32-racer-B_Mask.gbr",
"FileFunction": "SolderMask,Bot",
"FilePolarity": "Negative"
},
{
"Path": "esp32-racer-Edge_Cuts.gbr",
"FileFunction": "Profile",
"FilePolarity": "Positive"
}
],
"MaterialStackup": [
{
"Type": "Legend",
"Name": "Top Silk Screen"
},
{
"Type": "SolderPaste",
"Name": "Top Solder Paste"
},
{
"Type": "SolderMask",
"Thickness": 0.01,
"Name": "Top Solder Mask"
},
{
"Type": "Copper",
"Thickness": 0.035,
"Name": "F.Cu"
},
{
"Type": "Dielectric",
"Thickness": 0.1,
"Material": "FR4",
"Name": "F.Cu/In1.Cu",
"Notes": "Type: dielectric layer 1 (from F.Cu to In1.Cu)"
},
{
"Type": "Copper",
"Thickness": 0.035,
"Name": "In1.Cu"
},
{
"Type": "Dielectric",
"Thickness": 1.24,
"Material": "FR4",
"Name": "In1.Cu/In2.Cu",
"Notes": "Type: dielectric layer 2 (from In1.Cu to In2.Cu)"
},
{
"Type": "Copper",
"Thickness": 0.035,
"Name": "In2.Cu"
},
{
"Type": "Dielectric",
"Thickness": 0.1,
"Material": "FR4",
"Name": "In2.Cu/B.Cu",
"Notes": "Type: dielectric layer 3 (from In2.Cu to B.Cu)"
},
{
"Type": "Copper",
"Thickness": 0.035,
"Name": "B.Cu"
},
{
"Type": "SolderMask",
"Thickness": 0.01,
"Name": "Bottom Solder Mask"
},
{
"Type": "SolderPaste",
"Name": "Bottom Solder Paste"
},
{
"Type": "Legend",
"Name": "Bottom Silk Screen"
}
]
}

BIN
PCBs/old/esp32-racer.zip Normal file

Binary file not shown.

View File

@@ -7,7 +7,7 @@ this template will auto:
- create BOM for each project - create BOM for each project
- create images of the current pcb for your readme like you can see below - create images of the current pcb for your readme like you can see below
![rendered pcb](res/test_render.png) ![rendered pcb](/res/esp32-racer_render.png)
the code for creating all of this lives in `.hooks/` the code for creating all of this lives in `.hooks/`

View File

@@ -1,5 +1,5 @@
** Drc report for esp32-racer.kicad_pcb ** ** Drc report for esp32-racer.kicad_pcb **
** Created on 2026-04-14T21:36:54 ** ** Created on 2026-04-14T22:31:52 **
** Report includes: Errors, Warnings ** ** Report includes: Errors, Warnings **
** Found 292 DRC violations ** ** Found 292 DRC violations **
@@ -175,6 +175,10 @@
Rule: board setup constraints courtyard; error Rule: board setup constraints courtyard; error
@(58.8000 mm, 116.3000 mm): Footprint R17 @(58.8000 mm, 116.3000 mm): Footprint R17
@(60.8850 mm, 117.7750 mm): Footprint C109 @(60.8850 mm, 117.7750 mm): Footprint C109
[clearance]: Clearance violation (zone clearance 0.5000 mm; actual 0.0000 mm)
Local override; error
@(145.8800 mm, 101.5550 mm): Track [/MCU/PWR_SWTICH_EN] on F.Cu, length 6.6550 mm
@(189.2500 mm, 52.0000 mm): Zone [GND] on F.Cu, B.Cu and 2 more, priority 0
[clearance]: Clearance violation (zone clearance 0.5000 mm; actual 0.0000 mm) [clearance]: Clearance violation (zone clearance 0.5000 mm; actual 0.0000 mm)
Local override; error Local override; error
@(137.5750 mm, 101.5500 mm): Via [GND] on F.Cu - B.Cu @(137.5750 mm, 101.5500 mm): Via [GND] on F.Cu - B.Cu
@@ -183,10 +187,6 @@
Rule: board setup constraints hole; error Rule: board setup constraints hole; error
@(137.5750 mm, 101.5500 mm): Via [GND] on F.Cu - B.Cu @(137.5750 mm, 101.5500 mm): Via [GND] on F.Cu - B.Cu
@(110.0000 mm, 78.9000 mm): Zone [+3.3V] on In2.Cu, priority 11 @(110.0000 mm, 78.9000 mm): Zone [+3.3V] on In2.Cu, priority 11
[clearance]: Clearance violation (zone clearance 0.5000 mm; actual 0.0000 mm)
Local override; error
@(145.8800 mm, 101.5550 mm): Track [/MCU/PWR_SWTICH_EN] on F.Cu, length 6.6550 mm
@(189.2500 mm, 52.0000 mm): Zone [GND] on F.Cu, B.Cu and 2 more, priority 0
[clearance]: Clearance violation (zone clearance 0.5000 mm; actual 0.4369 mm) [clearance]: Clearance violation (zone clearance 0.5000 mm; actual 0.4369 mm)
Local override; error Local override; error
@(149.3000 mm, 102.6000 mm): Track [Net-(U5-EN)] on F.Cu, length 1.4779 mm @(149.3000 mm, 102.6000 mm): Track [Net-(U5-EN)] on F.Cu, length 1.4779 mm
@@ -203,6 +203,10 @@
Local override; error Local override; error
@(202.7100 mm, 87.1000 mm): Pad 3 [GND] of Q18 on F.Cu @(202.7100 mm, 87.1000 mm): Pad 3 [GND] of Q18 on F.Cu
@(203.3500 mm, 87.1000 mm): Pad 4 [Net-(D34-A1)] of Q18 on F.Cu @(203.3500 mm, 87.1000 mm): Pad 4 [Net-(D34-A1)] of Q18 on F.Cu
[clearance]: Clearance violation ( clearance 0.2000 mm; actual 0.1400 mm)
Local override; error
@(122.1206 mm, 119.1295 mm): Pad 3 [+VPWR2] of Q13 on F.Cu
@(122.1206 mm, 119.7695 mm): Pad 4 [Net-(Q13-G)] of Q13 on F.Cu
[clearance]: Clearance violation ( clearance 0.2000 mm; actual 0.1400 mm) [clearance]: Clearance violation ( clearance 0.2000 mm; actual 0.1400 mm)
Local override; error Local override; error
@(127.8631 mm, 120.1795 mm): Pad 3 [Net-(M4--)] of Q14 on F.Cu @(127.8631 mm, 120.1795 mm): Pad 3 [Net-(M4--)] of Q14 on F.Cu
@@ -217,20 +221,24 @@
@(137.3131 mm, 117.7345 mm): Pad 4 [Net-(Q15-G)] of Q15 on F.Cu @(137.3131 mm, 117.7345 mm): Pad 4 [Net-(Q15-G)] of Q15 on F.Cu
[clearance]: Clearance violation ( clearance 0.2000 mm; actual 0.1400 mm) [clearance]: Clearance violation ( clearance 0.2000 mm; actual 0.1400 mm)
Local override; error Local override; error
@(122.1206 mm, 119.1295 mm): Pad 3 [+VPWR2] of Q13 on F.Cu @(132.2181 mm, 120.1795 mm): Pad 3 [Net-(M4-+)] of Q16 on F.Cu
@(122.1206 mm, 119.7695 mm): Pad 4 [Net-(Q13-G)] of Q13 on F.Cu @(132.8581 mm, 120.1795 mm): Pad 4 [Net-(Q16-G)] of Q16 on F.Cu
[clearance]: Clearance violation ( clearance 0.2000 mm; actual 0.1400 mm) [clearance]: Clearance violation ( clearance 0.2000 mm; actual 0.1400 mm)
Local override; error Local override; error
@(101.8524 mm, 119.1305 mm): Pad 3 [+VPWR2] of Q9 on F.Cu @(101.8524 mm, 119.1305 mm): Pad 3 [+VPWR2] of Q9 on F.Cu
@(101.8524 mm, 119.7705 mm): Pad 4 [Net-(Q9-G)] of Q9 on F.Cu @(101.8524 mm, 119.7705 mm): Pad 4 [Net-(Q9-G)] of Q9 on F.Cu
[clearance]: Clearance violation ( clearance 0.2000 mm; actual 0.1400 mm) [clearance]: Clearance violation ( clearance 0.2000 mm; actual 0.1400 mm)
Local override; error Local override; error
@(107.5949 mm, 120.1805 mm): Pad 3 [Net-(M3--)] of Q10 on F.Cu @(163.9040 mm, 119.2550 mm): Pad 3 [+VPWR1] of Q5 on F.Cu
@(108.2349 mm, 120.1805 mm): Pad 4 [Net-(Q10-G)] of Q10 on F.Cu @(163.9040 mm, 119.8950 mm): Pad 4 [Net-(Q5-G)] of Q5 on F.Cu
[clearance]: Clearance violation ( clearance 0.2000 mm; actual 0.1400 mm) [clearance]: Clearance violation ( clearance 0.2000 mm; actual 0.1400 mm)
Local override; error Local override; error
@(132.2181 mm, 120.1795 mm): Pad 3 [Net-(M4-+)] of Q16 on F.Cu @(117.0449 mm, 118.3755 mm): Pad 3 [+VPWR2] of Q11 on F.Cu
@(132.8581 mm, 120.1795 mm): Pad 4 [Net-(Q16-G)] of Q16 on F.Cu @(117.0449 mm, 117.7355 mm): Pad 4 [Net-(Q11-G)] of Q11 on F.Cu
[clearance]: Clearance violation ( clearance 0.2000 mm; actual 0.1400 mm)
Local override; error
@(107.5949 mm, 120.1805 mm): Pad 3 [Net-(M3--)] of Q10 on F.Cu
@(108.2349 mm, 120.1805 mm): Pad 4 [Net-(Q10-G)] of Q10 on F.Cu
[clearance]: Clearance violation (zone clearance 0.5000 mm; actual 0.0000 mm) [clearance]: Clearance violation (zone clearance 0.5000 mm; actual 0.0000 mm)
Local override; error Local override; error
@(145.8800 mm, 101.5550 mm): Pad 1 [/MCU/PWR_SWTICH_EN] of R65 on F.Cu @(145.8800 mm, 101.5550 mm): Pad 1 [/MCU/PWR_SWTICH_EN] of R65 on F.Cu
@@ -239,18 +247,10 @@
Local override; error Local override; error
@(147.5300 mm, 101.5550 mm): Pad 2 [Net-(U5-EN)] of R65 on F.Cu @(147.5300 mm, 101.5550 mm): Pad 2 [Net-(U5-EN)] of R65 on F.Cu
@(189.2500 mm, 52.0000 mm): Zone [GND] on F.Cu, B.Cu and 2 more, priority 0 @(189.2500 mm, 52.0000 mm): Zone [GND] on F.Cu, B.Cu and 2 more, priority 0
[clearance]: Clearance violation ( clearance 0.2000 mm; actual 0.1400 mm)
Local override; error
@(163.9040 mm, 119.2550 mm): Pad 3 [+VPWR1] of Q5 on F.Cu
@(163.9040 mm, 119.8950 mm): Pad 4 [Net-(Q5-G)] of Q5 on F.Cu
[clearance]: Clearance violation ( clearance 0.2000 mm; actual 0.1400 mm) [clearance]: Clearance violation ( clearance 0.2000 mm; actual 0.1400 mm)
Local override; error Local override; error
@(202.0475 mm, 80.0700 mm): Pad 3 [Net-(BT1--)] of Q17 on F.Cu @(202.0475 mm, 80.0700 mm): Pad 3 [Net-(BT1--)] of Q17 on F.Cu
@(201.4075 mm, 80.0700 mm): Pad 4 [Net-(D32-A1)] of Q17 on F.Cu @(201.4075 mm, 80.0700 mm): Pad 4 [Net-(D32-A1)] of Q17 on F.Cu
[clearance]: Clearance violation ( clearance 0.2000 mm; actual 0.1400 mm)
Local override; error
@(117.0449 mm, 118.3755 mm): Pad 3 [+VPWR2] of Q11 on F.Cu
@(117.0449 mm, 117.7355 mm): Pad 4 [Net-(Q11-G)] of Q11 on F.Cu
[clearance]: Clearance violation ( clearance 0.2000 mm; actual 0.1400 mm) [clearance]: Clearance violation ( clearance 0.2000 mm; actual 0.1400 mm)
Local override; error Local override; error
@(174.0015 mm, 120.3050 mm): Pad 3 [Net-(M2-+)] of Q8 on F.Cu @(174.0015 mm, 120.3050 mm): Pad 3 [Net-(M2-+)] of Q8 on F.Cu
@@ -963,12 +963,6 @@
[track_dangling]: Track has unconnected end [track_dangling]: Track has unconnected end
Local override; warning Local override; warning
@(55.0750 mm, 74.4000 mm): Track [Net-(J8-Pin_3)] on F.Cu, length 0.1250 mm @(55.0750 mm, 74.4000 mm): Track [Net-(J8-Pin_3)] on F.Cu, length 0.1250 mm
[track_dangling]: Track has unconnected end
Local override; warning
@(50.4000 mm, 85.6000 mm): Track [/MCU/PWR_SWTICH_EN] on F.Cu, length 0.1850 mm
[track_dangling]: Track has unconnected end
Local override; warning
@(139.2000 mm, 104.3000 mm): Track [/MCU/PWR_SWTICH_EN] on F.Cu, length 0.8100 mm
[track_dangling]: Track has unconnected end [track_dangling]: Track has unconnected end
Local override; warning Local override; warning
@(111.2787 mm, 102.4868 mm): Track [Net-(Q11-G)] on F.Cu, length 0.1149 mm @(111.2787 mm, 102.4868 mm): Track [Net-(Q11-G)] on F.Cu, length 0.1149 mm
@@ -1005,6 +999,12 @@
[track_dangling]: Track has unconnected end [track_dangling]: Track has unconnected end
Local override; warning Local override; warning
@(75.6000 mm, 86.8000 mm): Track [/MCU/ENABLE_2] on F.Cu, length 0.2000 mm @(75.6000 mm, 86.8000 mm): Track [/MCU/ENABLE_2] on F.Cu, length 0.2000 mm
[track_dangling]: Track has unconnected end
Local override; warning
@(50.4000 mm, 85.6000 mm): Track [/MCU/PWR_SWTICH_EN] on F.Cu, length 0.1850 mm
[track_dangling]: Track has unconnected end
Local override; warning
@(139.2000 mm, 104.3000 mm): Track [/MCU/PWR_SWTICH_EN] on F.Cu, length 0.8100 mm
[track_dangling]: Track has unconnected end [track_dangling]: Track has unconnected end
Local override; warning Local override; warning
@(108.7904 mm, 97.9527 mm): Track [/BOARD_STAT_MESUREMENT/MOTOR_DRIVER_3_I_SENSE] on F.Cu, length 0.1122 mm @(108.7904 mm, 97.9527 mm): Track [/BOARD_STAT_MESUREMENT/MOTOR_DRIVER_3_I_SENSE] on F.Cu, length 0.1122 mm

View File

@@ -1,4 +1,4 @@
ERC report (2026-04-14T21:36:56, Encoding UTF8) ERC report (2026-04-14T22:31:54, Encoding UTF8)
Report includes: Errors, Warnings Report includes: Errors, Warnings
***** Sheet / ***** Sheet /
@@ -174,8 +174,8 @@ Report includes: Errors, Warnings
@(236.22 mm, 22.86 mm): Label '5v@2.5A' @(236.22 mm, 22.86 mm): Label '5v@2.5A'
[multiple_net_names]: Both +8V and 8v@3A are attached to the same items; +8V will be used in the netlist [multiple_net_names]: Both +8V and 8v@3A are attached to the same items; +8V will be used in the netlist
; warning ; warning
@(173.99 mm, 123.19 mm): Symbol #PWR089 Pin 1 [Power input, Line] @(280.67 mm, 74.93 mm): Symbol #PWR0114 Pin 1 [Power input, Line]
@(273.05 mm, 85.09 mm): Label '8v@3A' @(240.03 mm, 85.09 mm): Label '8v@3A'
[multiple_net_names]: Both +3.3V and 3.3v@1A are attached to the same items; +3.3V will be used in the netlist [multiple_net_names]: Both +3.3V and 3.3v@1A are attached to the same items; +3.3V will be used in the netlist
; warning ; warning
@(276.86 mm, 146.05 mm): Symbol #PWR0110 Pin 1 [Power input, Line] @(276.86 mm, 146.05 mm): Symbol #PWR0110 Pin 1 [Power input, Line]

Binary file not shown.

View File

@@ -1,7 +1,7 @@
(kicad_symbol_lib (kicad_symbol_lib
(version 20241209) (version 20251024)
(generator "kicad_symbol_editor") (generator "kicad_symbol_editor")
(generator_version "9.0") (generator_version "10.0")
(symbol "DOZ50N03" (symbol "DOZ50N03"
(pin_names (pin_names
(offset 0) (offset 0)
@@ -10,8 +10,12 @@
(exclude_from_sim no) (exclude_from_sim no)
(in_bom yes) (in_bom yes)
(on_board yes) (on_board yes)
(in_pos_files yes)
(duplicate_pin_numbers_are_jumpers no)
(property "Reference" "Q4" (property "Reference" "Q4"
(at 6.35 1.2701 0) (at 6.35 1.2701 0)
(show_name no)
(do_not_autoplace no)
(effects (effects
(font (font
(size 1.27 1.27) (size 1.27 1.27)
@@ -21,6 +25,8 @@
) )
(property "Value" "DOZ50N03" (property "Value" "DOZ50N03"
(at 6.35 -1.2699 0) (at 6.35 -1.2699 0)
(show_name no)
(do_not_autoplace no)
(effects (effects
(font (font
(size 1.27 1.27) (size 1.27 1.27)
@@ -30,74 +36,90 @@
) )
(property "Footprint" "Package_SON:VSON-8_3.3x3.3mm_P0.65mm_NexFET" (property "Footprint" "Package_SON:VSON-8_3.3x3.3mm_P0.65mm_NexFET"
(at 5.08 2.54 0) (at 5.08 2.54 0)
(show_name no)
(do_not_autoplace no)
(hide yes)
(effects (effects
(font (font
(size 1.27 1.27) (size 1.27 1.27)
) )
(hide yes)
) )
) )
(property "Datasheet" "https://www.lcsc.com/datasheet/C36499165.pdf" (property "Datasheet" "https://www.lcsc.com/datasheet/C36499165.pdf"
(at 0 0 0) (at 0 0 0)
(show_name no)
(do_not_autoplace no)
(hide yes)
(effects (effects
(font (font
(size 1.27 1.27) (size 1.27 1.27)
) )
(hide yes)
) )
) )
(property "Description" "C36499165" (property "Description" "C36499165"
(at 0 0 0) (at 0 0 0)
(show_name no)
(do_not_autoplace no)
(hide yes)
(effects (effects
(font (font
(size 1.27 1.27) (size 1.27 1.27)
) )
(hide yes)
) )
) )
(property "NOTES" "" (property "NOTES" ""
(at 0 0 0) (at 0 0 0)
(show_name no)
(do_not_autoplace no)
(hide yes)
(effects (effects
(font (font
(size 1.27 1.27) (size 1.27 1.27)
) )
(hide yes)
) )
) )
(property "Part Number" "" (property "Part Number" ""
(at 0 0 0) (at 0 0 0)
(show_name no)
(do_not_autoplace no)
(hide yes)
(effects (effects
(font (font
(size 1.27 1.27) (size 1.27 1.27)
) )
(hide yes)
) )
) )
(property "Supplier PN" "" (property "Supplier PN" ""
(at 0 0 0) (at 0 0 0)
(show_name no)
(do_not_autoplace no)
(hide yes)
(effects (effects
(font (font
(size 1.27 1.27) (size 1.27 1.27)
) )
(hide yes)
) )
) )
(property "Supplier link" "" (property "Supplier link" ""
(at 0 0 0) (at 0 0 0)
(show_name no)
(do_not_autoplace no)
(hide yes)
(effects (effects
(font (font
(size 1.27 1.27) (size 1.27 1.27)
) )
(hide yes)
) )
) )
(property "ki_keywords" "transistor NMOS N-MOS N-MOSFET" (property "ki_keywords" "transistor NMOS N-MOS N-MOSFET"
(at 0 0 0) (at 0 0 0)
(show_name no)
(do_not_autoplace no)
(hide yes)
(effects (effects
(font (font
(size 1.27 1.27) (size 1.27 1.27)
) )
(hide yes)
) )
) )
(symbol "DOZ50N03_0_1" (symbol "DOZ50N03_0_1"
@@ -268,6 +290,62 @@
) )
) )
(symbol "DOZ50N03_1_1" (symbol "DOZ50N03_1_1"
(pin passive line
(at 2.54 -5.08 90)
(length 2.54)
(name "D"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "1"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin passive line
(at 2.54 -5.08 90)
(length 2.54)
(hide yes)
(name "D"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "2"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin passive line
(at 2.54 -5.08 90)
(length 2.54)
(hide yes)
(name "D"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "3"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin input line (pin input line
(at -5.08 0 0) (at -5.08 0 0)
(length 5.08) (length 5.08)
@@ -289,62 +367,6 @@
(pin passive line (pin passive line
(at 2.54 5.08 270) (at 2.54 5.08 270)
(length 2.54) (length 2.54)
(name "D"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "1"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin passive line
(at 2.54 5.08 270)
(length 2.54)
(hide yes)
(name "D"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "2"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin passive line
(at 2.54 5.08 270)
(length 2.54)
(hide yes)
(name "D"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "3"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin passive line
(at 2.54 -5.08 90)
(length 2.54)
(name "S" (name "S"
(effects (effects
(font (font
@@ -367,8 +389,12 @@
(exclude_from_sim no) (exclude_from_sim no)
(in_bom yes) (in_bom yes)
(on_board yes) (on_board yes)
(in_pos_files yes)
(duplicate_pin_numbers_are_jumpers no)
(property "Reference" "U" (property "Reference" "U"
(at 13.208 -26.67 0) (at 13.208 -26.67 0)
(show_name no)
(do_not_autoplace no)
(effects (effects
(font (font
(size 1.27 1.27) (size 1.27 1.27)
@@ -377,6 +403,8 @@
) )
(property "Value" "TI DRV8701ERGER" (property "Value" "TI DRV8701ERGER"
(at -10.922 26.924 0) (at -10.922 26.924 0)
(show_name no)
(do_not_autoplace no)
(effects (effects
(font (font
(size 1.27 1.27) (size 1.27 1.27)
@@ -385,31 +413,37 @@
) )
(property "Footprint" "Package_DFN_QFN:VQFN-24-1EP_4x4mm_P0.5mm_EP2.45x2.45mm_ThermalVias" (property "Footprint" "Package_DFN_QFN:VQFN-24-1EP_4x4mm_P0.5mm_EP2.45x2.45mm_ThermalVias"
(at 9.144 -28.956 0) (at 9.144 -28.956 0)
(show_name no)
(do_not_autoplace no)
(hide yes)
(effects (effects
(font (font
(size 1.27 1.27) (size 1.27 1.27)
) )
(justify left) (justify left)
(hide yes)
) )
) )
(property "Datasheet" "kicad-embed://drv8701.pdf" (property "Datasheet" "kicad-embed://drv8701.pdf"
(at 9.398 -30.734 0) (at 9.398 -30.734 0)
(show_name no)
(do_not_autoplace no)
(hide yes)
(effects (effects
(font (font
(size 1.27 1.27) (size 1.27 1.27)
) )
(justify left) (justify left)
(hide yes)
) )
) )
(property "Description" "" (property "Description" ""
(at 0 0 0) (at 0 0 0)
(show_name no)
(do_not_autoplace no)
(hide yes)
(effects (effects
(font (font
(size 1.27 1.27) (size 1.27 1.27)
) )
(hide yes)
) )
) )
(symbol "DRV8701E_1_1" (symbol "DRV8701E_1_1"
@@ -424,6 +458,24 @@
(type background) (type background)
) )
) )
(pin power_in line
(at 0 27.94 270)
(length 2.54)
(name "VM"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "1"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin power_out line (pin power_out line
(at -16.51 22.86 0) (at -16.51 22.86 0)
(length 2.54) (length 2.54)
@@ -478,17 +530,35 @@
) )
) )
) )
(pin power_out line (pin power_in line
(at -16.51 12.7 0) (at 0 -27.94 90)
(length 2.54) (length 2.54)
(name "DVDD" (name "GND"
(effects (effects
(font (font
(size 1.27 1.27) (size 1.27 1.27)
) )
) )
) )
(number "8" (number "5"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin input line
(at -16.51 7.62 0)
(length 2.54)
(name "VREF"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "6"
(effects (effects
(font (font
(size 1.27 1.27) (size 1.27 1.27)
@@ -514,17 +584,107 @@
) )
) )
) )
(pin input line (pin power_out line
(at -16.51 7.62 0) (at -16.51 12.7 0)
(length 2.54) (length 2.54)
(name "VREF" (name "DVDD"
(effects (effects
(font (font
(size 1.27 1.27) (size 1.27 1.27)
) )
) )
) )
(number "6" (number "8"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin open_collector line
(at -16.51 -22.86 0)
(length 2.54)
(name "nFAULT"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "9"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin open_collector line
(at -16.51 -20.32 0)
(length 2.54)
(name "SNSOUT"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "10"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin output line
(at -16.51 -3.81 0)
(length 2.54)
(name "SO"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "11"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin input line
(at -16.51 -12.7 0)
(length 2.54)
(name "IDRIVE"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "12"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin input line
(at -16.51 -10.16 0)
(length 2.54)
(name "nSLEEP"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "13"
(effects (effects
(font (font
(size 1.27 1.27) (size 1.27 1.27)
@@ -568,114 +728,6 @@
) )
) )
) )
(pin output line
(at -16.51 -3.81 0)
(length 2.54)
(name "SO"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "11"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin input line
(at -16.51 -10.16 0)
(length 2.54)
(name "nSLEEP"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "13"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin input line
(at -16.51 -12.7 0)
(length 2.54)
(name "IDRIVE"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "12"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin open_collector line
(at -16.51 -20.32 0)
(length 2.54)
(name "SNSOUT"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "10"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin open_collector line
(at -16.51 -22.86 0)
(length 2.54)
(name "nFAULT"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "9"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin power_in line
(at 0 27.94 270)
(length 2.54)
(name "VM"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "1"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin power_in line (pin power_in line
(at 0 -27.94 90) (at 0 -27.94 90)
(length 2.54) (length 2.54)
@@ -695,43 +747,6 @@
) )
) )
) )
(pin power_in line
(at 0 -27.94 90)
(length 2.54)
(hide yes)
(name "GND"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "25"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin power_in line
(at 0 -27.94 90)
(length 2.54)
(name "GND"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "5"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin output line (pin output line
(at 16.51 17.78 180) (at 16.51 17.78 180)
(length 2.54) (length 2.54)
@@ -786,17 +801,17 @@
) )
) )
) )
(pin output line (pin input line
(at 16.51 2.54 180) (at 16.51 -17.78 180)
(length 2.54) (length 2.54)
(name "GH2" (name "SN"
(effects (effects
(font (font
(size 1.27 1.27) (size 1.27 1.27)
) )
) )
) )
(number "24" (number "20"
(effects (effects
(font (font
(size 1.27 1.27) (size 1.27 1.27)
@@ -805,16 +820,16 @@
) )
) )
(pin input line (pin input line
(at 16.51 0 180) (at 16.51 -12.7 180)
(length 2.54) (length 2.54)
(name "SH2" (name "SP"
(effects (effects
(font (font
(size 1.27 1.27) (size 1.27 1.27)
) )
) )
) )
(number "23" (number "21"
(effects (effects
(font (font
(size 1.27 1.27) (size 1.27 1.27)
@@ -841,16 +856,16 @@
) )
) )
(pin input line (pin input line
(at 16.51 -12.7 180) (at 16.51 0 180)
(length 2.54) (length 2.54)
(name "SP" (name "SH2"
(effects (effects
(font (font
(size 1.27 1.27) (size 1.27 1.27)
) )
) )
) )
(number "21" (number "23"
(effects (effects
(font (font
(size 1.27 1.27) (size 1.27 1.27)
@@ -858,17 +873,36 @@
) )
) )
) )
(pin input line (pin output line
(at 16.51 -17.78 180) (at 16.51 2.54 180)
(length 2.54) (length 2.54)
(name "SN" (name "GH2"
(effects (effects
(font (font
(size 1.27 1.27) (size 1.27 1.27)
) )
) )
) )
(number "20" (number "24"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin power_in line
(at 0 -27.94 90)
(length 2.54)
(hide yes)
(name "GND"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "25"
(effects (effects
(font (font
(size 1.27 1.27) (size 1.27 1.27)

File diff suppressed because it is too large Load Diff

View File

@@ -1,2 +0,0 @@
Hello World
No module named 'KLEPlacement'Bye

View File

@@ -6634,6 +6634,39 @@
) )
) )
) )
(property "Part Number" "TXB0104DR"
(at 46.99 91.44 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Supplier PN" "C2652946"
(at 46.99 91.44 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Supplier link" "https://www.lcsc.com/product-detail/C2652946.html?s_z=n_txb0104"
(at 46.99 91.44 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(pin "2" (pin "2"
(uuid "ac82b704-1a8b-4e36-b906-a3622bda8e71") (uuid "ac82b704-1a8b-4e36-b906-a3622bda8e71")
) )
@@ -9582,7 +9615,7 @@
) )
) )
) )
(property "Supplier link" "" (property "Supplier link" "https://www.lcsc.com/product-detail/C324082.html?s_z=n_txs0102"
(at 209.55 67.31 0) (at 209.55 67.31 0)
(hide yes) (hide yes)
(show_name no) (show_name no)
@@ -9593,7 +9626,7 @@
) )
) )
) )
(property "Supplier PN" "" (property "Supplier PN" "C324082"
(at 209.55 67.31 0) (at 209.55 67.31 0)
(hide yes) (hide yes)
(show_name no) (show_name no)
@@ -9604,7 +9637,7 @@
) )
) )
) )
(property "Part Number" "" (property "Part Number" "TXS0102DCTR"
(at 209.55 67.31 0) (at 209.55 67.31 0)
(hide yes) (hide yes)
(show_name no) (show_name no)
@@ -11434,7 +11467,7 @@
) )
) )
) )
(property "Supplier link" "" (property "Supplier link" "https://www.lcsc.com/product-detail/C324082.html?s_z=n_txs0102"
(at 207.01 138.43 0) (at 207.01 138.43 0)
(hide yes) (hide yes)
(show_name no) (show_name no)
@@ -11445,7 +11478,7 @@
) )
) )
) )
(property "Supplier PN" "" (property "Supplier PN" "C324082"
(at 207.01 138.43 0) (at 207.01 138.43 0)
(hide yes) (hide yes)
(show_name no) (show_name no)
@@ -11456,7 +11489,7 @@
) )
) )
) )
(property "Part Number" "" (property "Part Number" "TXS0102DCTR"
(at 207.01 138.43 0) (at 207.01 138.43 0)
(hide yes) (hide yes)
(show_name no) (show_name no)

View File

@@ -5,6 +5,129 @@
(uuid "1a26a228-6eb3-45fe-98b2-d5a826508636") (uuid "1a26a228-6eb3-45fe-98b2-d5a826508636")
(paper "A4") (paper "A4")
(lib_symbols (lib_symbols
(symbol "Connector:TestPoint"
(pin_numbers
(hide yes)
)
(pin_names
(offset 0.762)
(hide yes)
)
(exclude_from_sim no)
(in_bom yes)
(on_board yes)
(in_pos_files yes)
(duplicate_pin_numbers_are_jumpers no)
(property "Reference" "TP"
(at 0 6.858 0)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Value" "TestPoint"
(at 0 5.08 0)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Footprint" ""
(at 5.08 0 0)
(show_name no)
(do_not_autoplace no)
(hide yes)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Datasheet" ""
(at 5.08 0 0)
(show_name no)
(do_not_autoplace no)
(hide yes)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Description" "test point"
(at 0 0 0)
(show_name no)
(do_not_autoplace no)
(hide yes)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "ki_keywords" "test point tp"
(at 0 0 0)
(show_name no)
(do_not_autoplace no)
(hide yes)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "ki_fp_filters" "Pin* Test*"
(at 0 0 0)
(show_name no)
(do_not_autoplace no)
(hide yes)
(effects
(font
(size 1.27 1.27)
)
)
)
(symbol "TestPoint_0_1"
(circle
(center 0 3.302)
(radius 0.762)
(stroke
(width 0)
(type default)
)
(fill
(type none)
)
)
)
(symbol "TestPoint_1_1"
(pin passive line
(at 0 0 90)
(length 2.54)
(name "1"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "1"
(effects
(font
(size 1.27 1.27)
)
)
)
)
)
(embedded_fonts no)
)
(symbol "Connector_Generic:Conn_01x03" (symbol "Connector_Generic:Conn_01x03"
(pin_names (pin_names
(offset 1.016) (offset 1.016)
@@ -7479,7 +7602,7 @@
) )
) )
) )
(property "Supplier link" "" (property "Supplier link" "https://www.lcsc.com/product-detail/C324082.html?s_z=n_txs0102"
(at 52.07 49.53 0) (at 52.07 49.53 0)
(hide yes) (hide yes)
(show_name no) (show_name no)
@@ -7490,7 +7613,7 @@
) )
) )
) )
(property "Supplier PN" "" (property "Supplier PN" "C324082"
(at 52.07 49.53 0) (at 52.07 49.53 0)
(hide yes) (hide yes)
(show_name no) (show_name no)
@@ -7501,7 +7624,7 @@
) )
) )
) )
(property "Part Number" "" (property "Part Number" "TXS0102DCTR"
(at 52.07 49.53 0) (at 52.07 49.53 0)
(hide yes) (hide yes)
(show_name no) (show_name no)
@@ -7567,6 +7690,129 @@
) )
) )
) )
(symbol
(lib_id "Connector:TestPoint")
(at 100.33 176.53 270)
(unit 1)
(body_style 1)
(exclude_from_sim no)
(in_bom no)
(on_board yes)
(in_pos_files yes)
(dnp no)
(uuid "28380973-eb1f-42c1-bccb-bafa1d41b1aa")
(property "Reference" "TP2"
(at 105.664 176.784 90)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
(justify left)
)
)
(property "Value" "TestPoint"
(at 105.41 177.7999 90)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
(justify left)
)
)
(property "Footprint" "TestPoint:TestPoint_Pad_2.0x2.0mm"
(at 100.33 181.61 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Datasheet" ""
(at 100.33 181.61 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Description" "test point"
(at 100.33 176.53 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "NOTES" ""
(at 100.33 176.53 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Supplier link" ""
(at 100.33 176.53 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Supplier PN" ""
(at 100.33 176.53 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Part Number" ""
(at 100.33 176.53 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(pin "1"
(uuid "d341d7c3-98a3-412a-a5d0-041d92e49f6f")
)
(instances
(project "esp32-racer"
(path "/1d580319-54a9-438f-a4a3-ea2f61f357b8/2d868a8b-8f53-45e0-b871-4d23b4a3af01"
(reference "TP2")
(unit 1)
)
)
)
)
(symbol (symbol
(lib_id "Device:FerriteBead") (lib_id "Device:FerriteBead")
(at 33.02 83.82 180) (at 33.02 83.82 180)
@@ -11904,6 +12150,129 @@
) )
) )
) )
(symbol
(lib_id "Connector:TestPoint")
(at 100.33 173.99 270)
(unit 1)
(body_style 1)
(exclude_from_sim no)
(in_bom no)
(on_board yes)
(in_pos_files yes)
(dnp no)
(uuid "9516846e-5e4a-46fa-b6c1-34b8862062c3")
(property "Reference" "TP1"
(at 105.664 174.244 90)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
(justify left)
)
)
(property "Value" "TestPoint"
(at 105.41 175.2599 90)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
(justify left)
)
)
(property "Footprint" "TestPoint:TestPoint_Pad_2.0x2.0mm"
(at 100.33 179.07 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Datasheet" ""
(at 100.33 179.07 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Description" "test point"
(at 100.33 173.99 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "NOTES" ""
(at 100.33 173.99 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Supplier link" ""
(at 100.33 173.99 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Supplier PN" ""
(at 100.33 173.99 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Part Number" ""
(at 100.33 173.99 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(pin "1"
(uuid "7d0a6099-dd13-4b83-8a74-b0d6a3b9291c")
)
(instances
(project "esp32-racer"
(path "/1d580319-54a9-438f-a4a3-ea2f61f357b8/2d868a8b-8f53-45e0-b871-4d23b4a3af01"
(reference "TP1")
(unit 1)
)
)
)
)
(symbol (symbol
(lib_id "LED:SK6812") (lib_id "LED:SK6812")
(at 173.99 46.99 0) (at 173.99 46.99 0)

View File

@@ -1168,7 +1168,7 @@
) )
(symbol "DOZ50N03_1_1" (symbol "DOZ50N03_1_1"
(pin passive line (pin passive line
(at 2.54 5.08 270) (at 2.54 -5.08 90)
(length 2.54) (length 2.54)
(name "D" (name "D"
(effects (effects
@@ -1186,7 +1186,7 @@
) )
) )
(pin passive line (pin passive line
(at 2.54 5.08 270) (at 2.54 -5.08 90)
(length 2.54) (length 2.54)
(hide yes) (hide yes)
(name "D" (name "D"
@@ -1205,7 +1205,7 @@
) )
) )
(pin passive line (pin passive line
(at 2.54 5.08 270) (at 2.54 -5.08 90)
(length 2.54) (length 2.54)
(hide yes) (hide yes)
(name "D" (name "D"
@@ -1242,7 +1242,7 @@
) )
) )
(pin passive line (pin passive line
(at 2.54 -5.08 90) (at 2.54 5.08 270)
(length 2.54) (length 2.54)
(name "S" (name "S"
(effects (effects
@@ -51755,7 +51755,7 @@
) )
) )
) )
(property "Supplier link" "" (property "Supplier link" "https://www.lcsc.com/product-detail/C90964.html?s_z=n_drv8701"
(at 129.54 91.44 0) (at 129.54 91.44 0)
(hide yes) (hide yes)
(show_name no) (show_name no)
@@ -51766,7 +51766,7 @@
) )
) )
) )
(property "Supplier PN" "" (property "Supplier PN" "C90964"
(at 129.54 91.44 0) (at 129.54 91.44 0)
(hide yes) (hide yes)
(show_name no) (show_name no)
@@ -51777,7 +51777,7 @@
) )
) )
) )
(property "Part Number" "" (property "Part Number" "DRV8701ERGER"
(at 129.54 91.44 0) (at 129.54 91.44 0)
(hide yes) (hide yes)
(show_name no) (show_name no)
@@ -52435,7 +52435,7 @@
) )
) )
) )
(property "Supplier link" "" (property "Supplier link" "https://www.lcsc.com/product-detail/C2913282.html?s_z=n_XT30%252090degree"
(at 194.31 85.09 0) (at 194.31 85.09 0)
(hide yes) (hide yes)
(show_name no) (show_name no)
@@ -52446,7 +52446,7 @@
) )
) )
) )
(property "Supplier PN" "" (property "Supplier PN" "C2913282"
(at 194.31 85.09 0) (at 194.31 85.09 0)
(hide yes) (hide yes)
(show_name no) (show_name no)
@@ -52457,7 +52457,7 @@
) )
) )
) )
(property "Part Number" "" (property "Part Number" "XT30PW-F20.G.Y"
(at 194.31 85.09 0) (at 194.31 85.09 0)
(hide yes) (hide yes)
(show_name no) (show_name no)

File diff suppressed because it is too large Load Diff

View File

@@ -1532,7 +1532,7 @@
) )
(embedded_fonts no) (embedded_fonts no)
) )
(symbol "Diode:SMAJ24A" (symbol "Diode:SMAJ28A"
(pin_numbers (pin_numbers
(hide yes) (hide yes)
) )
@@ -1555,7 +1555,7 @@
) )
) )
) )
(property "Value" "SMAJ24A" (property "Value" "SMAJ28A"
(at 0 -2.54 0) (at 0 -2.54 0)
(show_name no) (show_name no)
(do_not_autoplace no) (do_not_autoplace no)
@@ -1587,7 +1587,7 @@
) )
) )
) )
(property "Description" "400W unidirectional Transient Voltage Suppressor, 24.0Vr, SMA(DO-214AC)" (property "Description" "400W unidirectional Transient Voltage Suppressor, 28.0Vr, SMA(DO-214AC)"
(at 0 0 0) (at 0 0 0)
(show_name no) (show_name no)
(do_not_autoplace no) (do_not_autoplace no)
@@ -1620,7 +1620,7 @@
) )
) )
) )
(symbol "SMAJ24A_0_1" (symbol "SMAJ28A_0_1"
(polyline (polyline
(pts (pts
(xy -0.762 1.27) (xy -1.27 1.27) (xy -1.27 -1.27) (xy -0.762 1.27) (xy -1.27 1.27) (xy -1.27 -1.27)
@@ -1646,7 +1646,7 @@
) )
) )
) )
(symbol "SMAJ24A_1_1" (symbol "SMAJ28A_1_1"
(pin passive line (pin passive line
(at -3.81 0 0) (at -3.81 0 0)
(length 2.54) (length 2.54)
@@ -3084,7 +3084,7 @@
) )
(symbol "DOZ50N03_1_1" (symbol "DOZ50N03_1_1"
(pin passive line (pin passive line
(at 2.54 5.08 270) (at 2.54 -5.08 90)
(length 2.54) (length 2.54)
(name "D" (name "D"
(effects (effects
@@ -3102,7 +3102,7 @@
) )
) )
(pin passive line (pin passive line
(at 2.54 5.08 270) (at 2.54 -5.08 90)
(length 2.54) (length 2.54)
(hide yes) (hide yes)
(name "D" (name "D"
@@ -3121,7 +3121,7 @@
) )
) )
(pin passive line (pin passive line
(at 2.54 5.08 270) (at 2.54 -5.08 90)
(length 2.54) (length 2.54)
(hide yes) (hide yes)
(name "D" (name "D"
@@ -3158,7 +3158,7 @@
) )
) )
(pin passive line (pin passive line
(at 2.54 -5.08 90) (at 2.54 5.08 270)
(length 2.54) (length 2.54)
(name "S" (name "S"
(effects (effects
@@ -3840,10 +3840,10 @@
(uuid "2a6f559c-bf21-4e1e-9468-7dcfb4f1bd69") (uuid "2a6f559c-bf21-4e1e-9468-7dcfb4f1bd69")
) )
(junction (junction
(at 83.82 111.76) (at 127 111.76)
(diameter 0) (diameter 0)
(color 0 0 0 0) (color 0 0 0 0)
(uuid "30c7b69e-e136-4835-9300-3bf430d1d514") (uuid "3e5b97b0-f105-4b32-8e07-2bbc1fd433e5")
) )
(junction (junction
(at 236.22 109.22) (at 236.22 109.22)
@@ -3869,11 +3869,17 @@
(color 0 0 0 0) (color 0 0 0 0)
(uuid "4f81b5f7-2161-45ac-961e-b6fb8d9f74b4") (uuid "4f81b5f7-2161-45ac-961e-b6fb8d9f74b4")
) )
(junction
(at 83.82 111.76)
(diameter 0)
(color 0 0 0 0)
(uuid "52b9f47e-2653-450b-b4fb-a9c48ffe08f6")
)
(junction (junction
(at 93.98 90.17) (at 93.98 90.17)
(diameter 0) (diameter 0)
(color 0 0 0 0) (color 0 0 0 0)
(uuid "50fb8d5f-bebd-4f63-9630-ef32cf1bc5e2") (uuid "70c89e26-2a63-43c7-bc69-06499a419ed0")
) )
(junction (junction
(at 73.66 104.14) (at 73.66 104.14)
@@ -3917,12 +3923,6 @@
(color 0 0 0 0) (color 0 0 0 0)
(uuid "d5ac0105-cc08-4aa5-93cd-0e689fe36dbd") (uuid "d5ac0105-cc08-4aa5-93cd-0e689fe36dbd")
) )
(junction
(at 127 111.76)
(diameter 0)
(color 0 0 0 0)
(uuid "edacc9da-4308-48af-a00f-f3473bf76de7")
)
(junction (junction
(at 154.94 90.17) (at 154.94 90.17)
(diameter 0) (diameter 0)
@@ -4193,16 +4193,6 @@
) )
(uuid "533688a8-0beb-469d-b892-ba51a4df83b7") (uuid "533688a8-0beb-469d-b892-ba51a4df83b7")
) )
(wire
(pts
(xy 93.98 90.17) (xy 109.22 90.17)
)
(stroke
(width 0)
(type default)
)
(uuid "539b35fb-ccbb-4253-ae75-7af9ffc4d451")
)
(wire (wire
(pts (pts
(xy 175.26 90.17) (xy 181.61 90.17) (xy 175.26 90.17) (xy 181.61 90.17)
@@ -4253,16 +4243,6 @@
) )
(uuid "75a18e33-4660-4a7d-bb4e-d0d2e93f43c4") (uuid "75a18e33-4660-4a7d-bb4e-d0d2e93f43c4")
) )
(wire
(pts
(xy 127 111.76) (xy 129.54 111.76)
)
(stroke
(width 0)
(type default)
)
(uuid "8168ae18-e1e1-4b56-b480-9beace246751")
)
(wire (wire
(pts (pts
(xy 127 104.14) (xy 134.62 104.14) (xy 127 104.14) (xy 134.62 104.14)
@@ -4325,7 +4305,7 @@
) )
(wire (wire
(pts (pts
(xy 83.82 111.76) (xy 93.98 111.76) (xy 78.74 111.76) (xy 83.82 111.76)
) )
(stroke (stroke
(width 0) (width 0)
@@ -4333,16 +4313,6 @@
) )
(uuid "9be8d9cb-7ad1-44fc-a2e7-3d07a489c0c0") (uuid "9be8d9cb-7ad1-44fc-a2e7-3d07a489c0c0")
) )
(wire
(pts
(xy 93.98 111.76) (xy 127 111.76)
)
(stroke
(width 0)
(type default)
)
(uuid "9c6e4ff6-9414-4ca5-b70a-acc8eb957841")
)
(wire (wire
(pts (pts
(xy 205.74 130.81) (xy 205.74 129.54) (xy 205.74 130.81) (xy 205.74 129.54)
@@ -4353,16 +4323,6 @@
) )
(uuid "a2d52e7d-387c-4260-998f-1b94bd84fe84") (uuid "a2d52e7d-387c-4260-998f-1b94bd84fe84")
) )
(wire
(pts
(xy 78.74 111.76) (xy 83.82 111.76)
)
(stroke
(width 0)
(type default)
)
(uuid "a3aef65d-601f-40b1-ab63-8eb94f613d06")
)
(polyline (polyline
(pts (pts
(xy 52.07 72.39) (xy 52.07 132.08) (xy 52.07 72.39) (xy 52.07 132.08)
@@ -4383,6 +4343,16 @@
) )
(uuid "ae006a61-dd17-412e-aa1b-7d1662907c78") (uuid "ae006a61-dd17-412e-aa1b-7d1662907c78")
) )
(wire
(pts
(xy 127 111.76) (xy 129.54 111.76)
)
(stroke
(width 0)
(type default)
)
(uuid "b0ab302a-243d-4a52-b689-374b9ce27264")
)
(wire (wire
(pts (pts
(xy 228.6 92.71) (xy 247.65 92.71) (xy 228.6 92.71) (xy 247.65 92.71)
@@ -4523,6 +4493,16 @@
) )
(uuid "e3ef6d00-0c92-45b5-9c90-00ec1831a43d") (uuid "e3ef6d00-0c92-45b5-9c90-00ec1831a43d")
) )
(wire
(pts
(xy 83.82 111.76) (xy 93.98 111.76)
)
(stroke
(width 0)
(type default)
)
(uuid "e881a786-a100-4804-8990-2a7da31ce892")
)
(wire (wire
(pts (pts
(xy 257.81 92.71) (xy 260.35 92.71) (xy 257.81 92.71) (xy 260.35 92.71)
@@ -4533,6 +4513,16 @@
) )
(uuid "e960cdcc-05c5-41da-a9f3-06f06944c43b") (uuid "e960cdcc-05c5-41da-a9f3-06f06944c43b")
) )
(wire
(pts
(xy 93.98 111.76) (xy 127 111.76)
)
(stroke
(width 0)
(type default)
)
(uuid "eaa5cbce-7357-4ce7-8510-332c97cd955d")
)
(wire (wire
(pts (pts
(xy 236.22 109.22) (xy 256.54 109.22) (xy 236.22 109.22) (xy 256.54 109.22)
@@ -4563,6 +4553,16 @@
) )
(uuid "f181a60c-0cb7-432f-88bb-4ba3753cdec4") (uuid "f181a60c-0cb7-432f-88bb-4ba3753cdec4")
) )
(wire
(pts
(xy 93.98 90.17) (xy 109.22 90.17)
)
(stroke
(width 0)
(type default)
)
(uuid "f378dd95-1b8a-4452-8530-c2d19a290f75")
)
(wire (wire
(pts (pts
(xy 139.7 120.65) (xy 139.7 111.76) (xy 139.7 120.65) (xy 139.7 111.76)
@@ -4637,152 +4637,6 @@
) )
(uuid "e2f13d58-f833-4702-8281-36c8fc0727cc") (uuid "e2f13d58-f833-4702-8281-36c8fc0727cc")
) )
(symbol
(lib_id "Diode:SMAJ24A")
(at 93.98 93.98 270)
(unit 1)
(body_style 1)
(exclude_from_sim no)
(in_bom yes)
(on_board yes)
(in_pos_files yes)
(dnp no)
(uuid "06399a5b-00ef-423b-910c-e3786d44bd57")
(property "Reference" "D33"
(at 96.52 92.7099 90)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
(justify left)
)
)
(property "Value" "SMAJ24A"
(at 96.52 95.2499 90)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
(justify left)
)
)
(property "Footprint" "Diode_SMD:D_SMA"
(at 88.9 93.98 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Datasheet" "https://www.littelfuse.com/media?resourcetype=datasheets&itemid=75e32973-b177-4ee3-a0ff-cedaf1abdb93&filename=smaj-datasheet"
(at 93.98 92.71 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Description" "400W unidirectional Transient Voltage Suppressor, 24.0Vr, SMA(DO-214AC)"
(at 93.98 93.98 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "NOTES" "24Vrwm"
(at 100.33 97.536 90)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Supplier link" "https://www.lcsc.com/product-detail/C148222.html?s_z=n_SMAJ24A"
(at 93.98 93.98 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Supplier PN" "C148222"
(at 93.98 93.98 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Part Number" "SMAJ24A"
(at 93.98 93.98 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Manufactor Part Number" ""
(at 93.98 93.98 90)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Supplier Part Number" ""
(at 93.98 93.98 90)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(pin "2"
(uuid "887f8220-8b7e-4e88-90e4-3fe841bde2fd")
)
(pin "1"
(uuid "35d99d24-d083-4956-9ea3-83d5e6ba1a60")
)
(instances
(project "esp32-racer"
(path "/1d580319-54a9-438f-a4a3-ea2f61f357b8/12408af9-30e9-42ec-a388-fbb9bc2a9d16/f13cf5e8-979b-4d0e-bcd6-7791c921a7bc"
(reference "D33")
(unit 1)
)
)
)
)
(symbol (symbol
(lib_id "power:GND") (lib_id "power:GND")
(at 256.54 123.19 0) (at 256.54 123.19 0)
@@ -5391,152 +5245,6 @@
) )
) )
) )
(symbol
(lib_id "Diode:SMAJ24A")
(at 83.82 107.95 270)
(unit 1)
(body_style 1)
(exclude_from_sim no)
(in_bom yes)
(on_board yes)
(in_pos_files yes)
(dnp no)
(uuid "23674968-18b5-4d07-bdee-42d4640c1879")
(property "Reference" "D32"
(at 86.36 105.664 90)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
(justify left)
)
)
(property "Value" "SMAJ24A"
(at 86.36 108.204 90)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
(justify left)
)
)
(property "Footprint" "Diode_SMD:D_SMA"
(at 78.74 107.95 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Datasheet" "https://www.littelfuse.com/media?resourcetype=datasheets&itemid=75e32973-b177-4ee3-a0ff-cedaf1abdb93&filename=smaj-datasheet"
(at 83.82 106.68 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Description" "400W unidirectional Transient Voltage Suppressor, 24.0Vr, SMA(DO-214AC)"
(at 83.82 107.95 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "NOTES" "24Vrwm"
(at 90.17 110.4901 90)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Supplier link" "https://www.lcsc.com/product-detail/C148222.html?s_z=n_SMAJ24A"
(at 83.82 107.95 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Supplier PN" "C148222"
(at 83.82 107.95 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Part Number" "SMAJ24A"
(at 83.82 107.95 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Manufactor Part Number" ""
(at 83.82 107.95 90)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Supplier Part Number" ""
(at 83.82 107.95 90)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(pin "2"
(uuid "9f20e883-37dd-4492-836a-72884c65ea83")
)
(pin "1"
(uuid "027cc545-fafd-4ea4-9ddb-5d6d2880a5fe")
)
(instances
(project "esp32-racer"
(path "/1d580319-54a9-438f-a4a3-ea2f61f357b8/12408af9-30e9-42ec-a388-fbb9bc2a9d16/f13cf5e8-979b-4d0e-bcd6-7791c921a7bc"
(reference "D32")
(unit 1)
)
)
)
)
(symbol (symbol
(lib_id "Device:R") (lib_id "Device:R")
(at 154.94 101.6 0) (at 154.94 101.6 0)
@@ -7181,6 +6889,39 @@
) )
) )
) )
(property "Part Number" "TSM24ADBZR"
(at 242.57 73.66 90)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Supplier PN" "C35968523"
(at 242.57 73.66 90)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Supplier link" "https://www.lcsc.com/product-detail/C35968523.html?s_z=n_tsm24a"
(at 242.57 73.66 90)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(pin "3" (pin "3"
(uuid "cf01a6d5-ee6c-459b-b63e-7cb8419ac063") (uuid "cf01a6d5-ee6c-459b-b63e-7cb8419ac063")
) )
@@ -7580,6 +7321,130 @@
) )
) )
) )
(symbol
(lib_id "Diode:SMAJ28A")
(at 83.82 107.95 270)
(unit 1)
(body_style 1)
(exclude_from_sim no)
(in_bom yes)
(on_board yes)
(in_pos_files yes)
(dnp no)
(uuid "bbc76fa9-33fd-46fd-b8db-14361d168f53")
(property "Reference" "D14"
(at 85.852 105.6639 90)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
(justify left)
)
)
(property "Value" "SMAJ28A"
(at 85.852 108.2039 90)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
(justify left)
)
)
(property "Footprint" "Diode_SMD:D_SMA"
(at 78.74 107.95 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Datasheet" "https://www.littelfuse.com/media?resourcetype=datasheets&itemid=75e32973-b177-4ee3-a0ff-cedaf1abdb93&filename=smaj-datasheet"
(at 83.82 106.68 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Description" "400W unidirectional Transient Voltage Suppressor, 28.0Vr, SMA(DO-214AC)"
(at 83.82 107.95 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "NOTES" "28Vrwm"
(at 89.408 110.236 90)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Supplier link" "https://www.lcsc.com/product-detail/C148227.html?s_z=n_SMAJ28A"
(at 83.82 107.95 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Supplier PN" "C148227"
(at 83.82 107.95 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Part Number" "SMAJ28A"
(at 83.82 107.95 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(pin "2"
(uuid "096db33b-cd95-4822-bd15-2141136d9250")
)
(pin "1"
(uuid "60d3087f-733d-4b42-9fc2-61d9acc5dd87")
)
(instances
(project "esp32-racer"
(path "/1d580319-54a9-438f-a4a3-ea2f61f357b8/12408af9-30e9-42ec-a388-fbb9bc2a9d16/f13cf5e8-979b-4d0e-bcd6-7791c921a7bc"
(reference "D14")
(unit 1)
)
)
)
)
(symbol (symbol
(lib_id "power:GND") (lib_id "power:GND")
(at 242.57 77.47 0) (at 242.57 77.47 0)
@@ -7658,8 +7523,9 @@
) )
) )
(symbol (symbol
(lib_id "Diode:SMAJ24A") (lib_id "Diode:SMAJ28A")
(at 127 107.95 270) (at 93.98 93.98 90)
(mirror x)
(unit 1) (unit 1)
(body_style 1) (body_style 1)
(exclude_from_sim no) (exclude_from_sim no)
@@ -7667,9 +7533,9 @@
(on_board yes) (on_board yes)
(in_pos_files yes) (in_pos_files yes)
(dnp no) (dnp no)
(uuid "c525c839-2d33-45ab-9c82-d58aa45f8074") (uuid "c5526a12-4840-480b-bd83-bf2c2208d642")
(property "Reference" "D34" (property "Reference" "D33"
(at 115.824 105.664 90) (at 91.948 91.6939 90)
(show_name no) (show_name no)
(do_not_autoplace no) (do_not_autoplace no)
(effects (effects
@@ -7679,8 +7545,8 @@
(justify left) (justify left)
) )
) )
(property "Value" "SMAJ24A" (property "Value" "SMAJ28A"
(at 115.824 108.204 90) (at 91.948 94.2339 90)
(show_name no) (show_name no)
(do_not_autoplace no) (do_not_autoplace no)
(effects (effects
@@ -7691,7 +7557,132 @@
) )
) )
(property "Footprint" "Diode_SMD:D_SMA" (property "Footprint" "Diode_SMD:D_SMA"
(at 121.92 107.95 0) (at 99.06 93.98 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Datasheet" "https://www.littelfuse.com/media?resourcetype=datasheets&itemid=75e32973-b177-4ee3-a0ff-cedaf1abdb93&filename=smaj-datasheet"
(at 93.98 92.71 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Description" "400W unidirectional Transient Voltage Suppressor, 28.0Vr, SMA(DO-214AC)"
(at 93.98 93.98 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "NOTES" "28Vrwm"
(at 88.392 96.266 90)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Supplier link" "https://www.lcsc.com/product-detail/C148227.html?s_z=n_SMAJ28A"
(at 93.98 93.98 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Supplier PN" "C148227"
(at 93.98 93.98 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Part Number" "SMAJ28A"
(at 93.98 93.98 0)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(pin "2"
(uuid "cb19bee6-12e9-4697-aa25-3d3ea096858e")
)
(pin "1"
(uuid "be64fe0a-d478-4ef2-93f9-91cf3d6a04d1")
)
(instances
(project "esp32-racer"
(path "/1d580319-54a9-438f-a4a3-ea2f61f357b8/12408af9-30e9-42ec-a388-fbb9bc2a9d16/f13cf5e8-979b-4d0e-bcd6-7791c921a7bc"
(reference "D33")
(unit 1)
)
)
)
)
(symbol
(lib_id "Diode:SMAJ28A")
(at 127 107.95 90)
(mirror x)
(unit 1)
(body_style 1)
(exclude_from_sim no)
(in_bom yes)
(on_board yes)
(in_pos_files yes)
(dnp no)
(uuid "e1602f43-cf79-4d67-a397-5d984e353c00")
(property "Reference" "D32"
(at 124.968 105.6639 90)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
(justify left)
)
)
(property "Value" "SMAJ28A"
(at 124.968 108.2039 90)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
(justify left)
)
)
(property "Footprint" "Diode_SMD:D_SMA"
(at 132.08 107.95 0)
(hide yes) (hide yes)
(show_name no) (show_name no)
(do_not_autoplace no) (do_not_autoplace no)
@@ -7712,7 +7703,7 @@
) )
) )
) )
(property "Description" "400W unidirectional Transient Voltage Suppressor, 24.0Vr, SMA(DO-214AC)" (property "Description" "400W unidirectional Transient Voltage Suppressor, 28.0Vr, SMA(DO-214AC)"
(at 127 107.95 0) (at 127 107.95 0)
(hide yes) (hide yes)
(show_name no) (show_name no)
@@ -7723,8 +7714,8 @@
) )
) )
) )
(property "NOTES" "24Vrwm" (property "NOTES" "28Vrwm"
(at 119.634 110.4901 90) (at 121.412 110.236 90)
(show_name no) (show_name no)
(do_not_autoplace no) (do_not_autoplace no)
(effects (effects
@@ -7733,7 +7724,7 @@
) )
) )
) )
(property "Supplier link" "https://www.lcsc.com/product-detail/C148222.html?s_z=n_SMAJ24A" (property "Supplier link" "https://www.lcsc.com/product-detail/C148227.html?s_z=n_SMAJ28A"
(at 127 107.95 0) (at 127 107.95 0)
(hide yes) (hide yes)
(show_name no) (show_name no)
@@ -7744,7 +7735,7 @@
) )
) )
) )
(property "Supplier PN" "C148222" (property "Supplier PN" "C148227"
(at 127 107.95 0) (at 127 107.95 0)
(hide yes) (hide yes)
(show_name no) (show_name no)
@@ -7755,7 +7746,7 @@
) )
) )
) )
(property "Part Number" "SMAJ24A" (property "Part Number" "SMAJ28A"
(at 127 107.95 0) (at 127 107.95 0)
(hide yes) (hide yes)
(show_name no) (show_name no)
@@ -7766,38 +7757,16 @@
) )
) )
) )
(property "Manufactor Part Number" ""
(at 127 107.95 90)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Supplier Part Number" ""
(at 127 107.95 90)
(hide yes)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(pin "2" (pin "2"
(uuid "79aa1e04-8a5f-4d5d-a80d-96bef3e4d7b1") (uuid "0c5746d4-f8ca-4f37-be16-4977a13bb5e0")
) )
(pin "1" (pin "1"
(uuid "00907ab7-1506-4faf-9bb8-39d7ec29d83a") (uuid "b9eaa99f-342c-474e-be0a-36afb02922b7")
) )
(instances (instances
(project "esp32-racer" (project "esp32-racer"
(path "/1d580319-54a9-438f-a4a3-ea2f61f357b8/12408af9-30e9-42ec-a388-fbb9bc2a9d16/f13cf5e8-979b-4d0e-bcd6-7791c921a7bc" (path "/1d580319-54a9-438f-a4a3-ea2f61f357b8/12408af9-30e9-42ec-a388-fbb9bc2a9d16/f13cf5e8-979b-4d0e-bcd6-7791c921a7bc"
(reference "D34") (reference "D32")
(unit 1) (unit 1)
) )
) )

File diff suppressed because it is too large Load Diff

View File

@@ -21,7 +21,7 @@
"footprints": true, "footprints": true,
"graphics": true, "graphics": true,
"keepouts": true, "keepouts": true,
"lockedItems": true, "lockedItems": false,
"otherItems": true, "otherItems": true,
"pads": true, "pads": true,
"text": true, "text": true,

View File

@@ -50,7 +50,7 @@
"silk_text_thickness": 0.1, "silk_text_thickness": 0.1,
"silk_text_upright": false, "silk_text_upright": false,
"zones": { "zones": {
"min_clearance": 0.0 "min_clearance": 0.5
} }
}, },
"diff_pair_dimensions": [ "diff_pair_dimensions": [
@@ -64,10 +64,6 @@
[ [
"courtyards_overlap|39255000|68870000|e06bdfe1-53ae-4fc2-b728-570ca465444f|e2dcf49c-eee1-4d66-a3a4-d1ffe470ec14", "courtyards_overlap|39255000|68870000|e06bdfe1-53ae-4fc2-b728-570ca465444f|e2dcf49c-eee1-4d66-a3a4-d1ffe470ec14",
"no they dont" "no they dont"
],
[
"courtyards_overlap|47772500|115322500|a77cb9f8-a301-4e84-a3b4-b4b67f4a3879|e06bdfe1-53ae-4fc2-b728-570ca465444f",
""
] ]
], ],
"meta": { "meta": {
@@ -533,7 +529,7 @@
"gencad": "", "gencad": "",
"idf": "", "idf": "",
"netlist": "", "netlist": "",
"plot": "", "plot": "../../PCBs/",
"pos_files": "", "pos_files": "",
"specctra_dsn": "", "specctra_dsn": "",
"step": "", "step": "",
@@ -773,7 +769,7 @@
"uuid": "1d580319-54a9-438f-a4a3-ea2f61f357b8" "uuid": "1d580319-54a9-438f-a4a3-ea2f61f357b8"
} }
], ],
"used_designators": "R65", "used_designators": "R65,TP1-2",
"variants": [] "variants": []
}, },
"sheets": [ "sheets": [

View File

@@ -0,0 +1,29 @@
IO0 boot
IO1 PWR_SWITCH_EN
IO2 PWR_SWITCH_PG
IO3 x
IO4 SERVO_1
IO5 SERVO_2
IO6 SERVO_3
IO7 SERVO_4
IO8 OUTBOUND_COMS_EN
IO9 PHASE_3
IO10 ENABLE_3
IO11 PHASE_4
IO12 ENABLE_4
IO13 PHASE_1
IO14 ENABLE_1
IO15 SDA
IO16 SCL
IO17 UART_TX
IO18 UART_RX
IO19 D-
IO20 D+
IO21 PHASE_2
IO38 LED_DATA
IO43 PROG_UART_TX
IO44 PROG_UART_RX
IO45 ENABLE_2
IO46 SERVO_EN
IO47 UNUSED
IO48 UNUSED

View File

@@ -0,0 +1,8 @@
# The following five lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.22)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
idf_build_set_property(MINIMAL_BUILD ON)
project(blink)

69
software/blink/README.md Normal file
View File

@@ -0,0 +1,69 @@
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-H2 | ESP32-H21 | ESP32-H4 | ESP32-P4 | ESP32-S2 | ESP32-S3 | ESP32-S31 |
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | --------- | -------- | -------- | -------- | -------- | --------- |
# Blink Example
(See the README.md file in the upper level 'examples' directory for more information about examples.)
This example demonstrates how to blink a LED by using the GPIO driver or using the [led_strip](https://components.espressif.com/component/espressif/led_strip) library if the LED is addressable e.g. [WS2812](https://cdn-shop.adafruit.com/datasheets/WS2812B.pdf). The `led_strip` library is installed via [component manager](main/idf_component.yml).
## How to Use Example
Before project configuration and build, be sure to set the correct chip target using `idf.py set-target <chip_name>`.
### Hardware Required
* A development board with normal LED or addressable LED on-board (e.g., ESP32-S3-DevKitC, ESP32-C6-DevKitC etc.)
* A USB cable for Power supply and programming
See [Development Boards](https://www.espressif.com/en/products/devkits) for more information about it.
### Configure the Project
Open the project configuration menu (`idf.py menuconfig`).
In the `Example Configuration` menu:
* Select the LED type in the `Blink LED type` option.
* Use `GPIO` for regular LED
* Use `LED strip` for addressable LED
* If the LED type is `LED strip`, select the backend peripheral
* `RMT` is only available for ESP targets with RMT peripheral supported
* `SPI` is available for all ESP targets
* Set the GPIO number used for the signal in the `Blink GPIO number` option.
* Set the blinking period in the `Blink period in ms` option.
### Build and Flash
Run `idf.py -p PORT flash monitor` to build, flash and monitor the project.
(To exit the serial monitor, type ``Ctrl-]``.)
See the [Getting Started Guide](https://docs.espressif.com/projects/esp-idf/en/latest/get-started/index.html) for full steps to configure and use ESP-IDF to build projects.
## Example Output
As you run the example, you will see the LED blinking, according to the previously defined period. For the addressable LED, you can also change the LED color by setting the `led_strip_set_pixel(led_strip, 0, 16, 16, 16);` (LED Strip, Pixel Number, Red, Green, Blue) with values from 0 to 255 in the [source file](main/blink_example_main.c).
```text
I (315) example: Example configured to blink addressable LED!
I (325) example: Turning the LED OFF!
I (1325) example: Turning the LED ON!
I (2325) example: Turning the LED OFF!
I (3325) example: Turning the LED ON!
I (4325) example: Turning the LED OFF!
I (5325) example: Turning the LED ON!
I (6325) example: Turning the LED OFF!
I (7325) example: Turning the LED ON!
I (8325) example: Turning the LED OFF!
```
Note: The color order could be different according to the LED model.
The pixel number indicates the pixel position in the LED strip. For a single LED, use 0.
## Troubleshooting
* If the LED isn't blinking, check the GPIO or the LED type selection in the `Example Configuration` menu.
For any technical queries, please open an [issue](https://github.com/espressif/esp-idf/issues) on GitHub. We will get back to you soon.

View File

@@ -0,0 +1,20 @@
dependencies:
espressif/led_strip:
component_hash: 28621486f77229aaf81c71f5e15d6fbf36c2949cf11094e07090593e659e7639
dependencies:
- name: idf
require: private
version: '>=5.0'
source:
registry_url: https://components.espressif.com/
type: service
version: 3.0.3
idf:
source:
type: idf
version: 6.1.0
direct_dependencies:
- espressif/led_strip
manifest_hash: cdcc77aff1f56b906c61e51c8f438577513c8d92aa9dfd7bf655f126d2b2d320
target: esp32s3
version: 3.0.0

View File

@@ -0,0 +1,2 @@
idf_component_register(SRCS "blink_example_main.c"
INCLUDE_DIRS ".")

View File

@@ -0,0 +1,49 @@
menu "Example Configuration"
orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps"
choice BLINK_LED
prompt "Blink LED type"
default BLINK_LED_GPIO
help
Select the LED type. A normal level controlled LED or an addressable LED strip.
The default selection is based on the Espressif DevKit boards.
You can change the default selection according to your board.
config BLINK_LED_GPIO
bool "GPIO"
config BLINK_LED_STRIP
bool "LED strip"
endchoice
choice BLINK_LED_STRIP_BACKEND
depends on BLINK_LED_STRIP
prompt "LED strip backend peripheral"
default BLINK_LED_STRIP_BACKEND_RMT if SOC_RMT_SUPPORTED
default BLINK_LED_STRIP_BACKEND_SPI
help
Select the backend peripheral to drive the LED strip.
config BLINK_LED_STRIP_BACKEND_RMT
depends on SOC_RMT_SUPPORTED
bool "RMT"
config BLINK_LED_STRIP_BACKEND_SPI
bool "SPI"
endchoice
config BLINK_GPIO
int "Blink GPIO number"
range ENV_GPIO_RANGE_MIN ENV_GPIO_OUT_RANGE_MAX
default 8
help
GPIO number (IOxx) to blink on and off the LED.
Some GPIOs are used for other purposes (flash connections, etc.) and cannot be used to blink.
config BLINK_PERIOD
int "Blink period in ms"
range 10 3600000
default 1000
help
Define the blinking period in milliseconds.
endmenu

View File

@@ -0,0 +1,108 @@
/* Blink Example
This example code is in the Public Domain (or CC0 licensed, at your option.)
Unless required by applicable law or agreed to in writing, this
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.
*/
#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "driver/gpio.h"
#include "esp_log.h"
#include "led_strip.h"
#include "sdkconfig.h"
static const char *TAG = "example";
/* Use project configuration menu (idf.py menuconfig) to choose the GPIO to blink,
or you can edit the following line and set a number here.
*/
#define BLINK_GPIO 38
static uint8_t s_led_state = 0;
#ifdef CONFIG_BLINK_LED_STRIP
static led_strip_handle_t led_strip;
static void blink_led(void)
{
/* If the addressable LED is enabled */
if (s_led_state) {
/* Set the LED pixel using RGB from 0 (0%) to 255 (100%) for each color */
led_strip_set_pixel(led_strip, 0, 255, 0, 0);
led_strip_set_pixel(led_strip, 1, 255, 128, 0);
led_strip_set_pixel(led_strip, 2, 255, 255, 0);
led_strip_set_pixel(led_strip, 3, 0, 255, 0);
led_strip_set_pixel(led_strip, 4, 0, 0, 255);
/* Refresh the strip to send data */
led_strip_refresh(led_strip);
} else {
/* Set all LED off to clear all pixels */
led_strip_clear(led_strip);
}
}
static void configure_led(void)
{
ESP_LOGI(TAG, "Example configured to blink addressable LED!");
/* LED strip initialization with the GPIO and pixels number*/
led_strip_config_t strip_config = {
.strip_gpio_num = BLINK_GPIO,
.max_leds = 5, // at least one LED on board
};
#if CONFIG_BLINK_LED_STRIP_BACKEND_RMT
led_strip_rmt_config_t rmt_config = {
.resolution_hz = 10 * 1000 * 1000, // 10MHz
.flags.with_dma = false,
};
ESP_ERROR_CHECK(led_strip_new_rmt_device(&strip_config, &rmt_config, &led_strip));
#elif CONFIG_BLINK_LED_STRIP_BACKEND_SPI
led_strip_spi_config_t spi_config = {
.spi_bus = SPI2_HOST,
.flags.with_dma = true,
};
ESP_ERROR_CHECK(led_strip_new_spi_device(&strip_config, &spi_config, &led_strip));
#else
#error "unsupported LED strip backend"
#endif
/* Set all LED off to clear all pixels */
led_strip_clear(led_strip);
}
#elif CONFIG_BLINK_LED_GPIO
static void blink_led(void)
{
/* Set the GPIO level according to the state (LOW or HIGH)*/
gpio_set_level(BLINK_GPIO, s_led_state);
}
static void configure_led(void)
{
ESP_LOGI(TAG, "Example configured to blink GPIO LED!");
gpio_reset_pin(BLINK_GPIO);
/* Set the GPIO as a push/pull output */
gpio_set_direction(BLINK_GPIO, GPIO_MODE_OUTPUT);
}
#else
#error "unsupported LED type"
#endif
void app_main(void)
{
/* Configure the peripheral according to the LED type */
configure_led();
while (1) {
ESP_LOGI(TAG, "Turning the LED %s!", s_led_state == true ? "ON" : "OFF");
blink_led();
/* Toggle the LED state */
s_led_state = !s_led_state;
vTaskDelay(CONFIG_BLINK_PERIOD / portTICK_PERIOD_MS);
}
}

View File

@@ -0,0 +1,2 @@
dependencies:
espressif/led_strip: "^3.0.0"

View File

@@ -0,0 +1 @@
28621486f77229aaf81c71f5e15d6fbf36c2949cf11094e07090593e659e7639

View File

@@ -0,0 +1,67 @@
## 3.0.3
- Support WS2816 with 16-bit color
## 3.0.1
- Support WS2811 bit timing
## 3.0.0
- Discontinued support for ESP-IDF v4.x
- Added configuration for user-defined color component format
## 2.5.5
- Simplified the led_strip component dependency, the time of full build with ESP-IDF v5.3 can now be shorter.
## 2.5.4
- Inserted extra delay when initialize the SPI LED device, to ensure all LEDs are in the reset state correctly
## 2.5.3
- Extend reset time (280us) to support WS2812B-V5
## 2.5.2
- Added API reference doc (api.md)
## 2.5.0
- Enabled support for IDF4.4 and above
- with RMT backend only
- Added API `led_strip_set_pixel_hsv`
## 2.4.0
- Support configurable SPI mode to control leds
- recommend enabling DMA when using SPI mode
## 2.3.0
- Support configurable RMT channel size by setting `mem_block_symbols`
## 2.2.0
- Support for 4 components RGBW leds (SK6812):
- in led_strip_config_t new fields
led_pixel_format, controlling byte format (LED_PIXEL_FORMAT_GRB, LED_PIXEL_FORMAT_GRBW)
led_model, used to configure bit timing (LED_MODEL_WS2812, LED_MODEL_SK6812)
- new API led_strip_set_pixel_rgbw
- new interface type set_pixel_rgbw
## 2.1.0
- Support DMA feature, which offloads the CPU by a lot when it comes to drive a bunch of LEDs
- Support various RMT clock sources
- Acquire and release the power management lock before and after each refresh
- New driver flag: `invert_out` which can invert the led control signal by hardware
## 2.0.0
- Reimplemented the driver using the new RMT driver (`driver/rmt_tx.h`)
## 1.0.0
- Initial driver version, based on the legacy RMT driver (`driver/rmt.h`)

View File

@@ -0,0 +1 @@
{"version":"1.0","algorithm":"sha256","created_at":"2026-02-04T21:14:01.842522+00:00","files":[{"path":"CHANGELOG.md","size":1667,"hash":"b445b45b8ce496848e247b569090efc3ea1a8680b8e69a7309dbdeeb97eb9d51"},{"path":"CMakeLists.txt","size":917,"hash":"038cbe6ba04c27101892e51d9d6a0627d64130f666f5d61b1f097462f982955b"},{"path":"LICENSE","size":11358,"hash":"cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30"},{"path":"README.md","size":2072,"hash":"12e83a316c51d85c6c1ee2e5eecfb46691f6be42ce685eece2ce063a9c949001"},{"path":"idf_component.yml","size":492,"hash":"f4f09e02e4e53be5b49defeab1b6da6cdb9acfe377df892dfef5a0c370a7f88e"},{"path":"docs/Doxyfile","size":738,"hash":"7f64bdef18c3ed6f2e3d6397066e2fad4b5e31c2052744ca9631f34f69fdff79"},{"path":"docs/book.toml","size":297,"hash":"5d66624796168a4b8d0d87631c438c392b973206f4f7c53d9897a0b7ca7ce5b4"},{"path":"include/led_strip.h","size":4313,"hash":"36344aae936d7e0e764954188d77160c357d3ae1990ede1c7451e2bd1c0e85eb"},{"path":"include/led_strip_rmt.h","size":1630,"hash":"c63a152ab4aa187080b8d29cdb49365a9ea03b6ca7c41c66920e5c58ac0d0c52"},{"path":"include/led_strip_spi.h","size":1599,"hash":"cf0dcd5c748a7f11bf55077325b68a64ea826e55fc8e7b38aaad6fc0eb5345e5"},{"path":"include/led_strip_types.h","size":4276,"hash":"168b30b21ecbc5789903204753958c781304324e6a44d40a5fcb8676f12cb29c"},{"path":"interface/led_strip_interface.h","size":2934,"hash":"5b7d0c326d0d0d9748830d4aec46d765400e1446055d4a1197c83111e937d74c"},{"path":"src/led_strip_api.c","size":3841,"hash":"61968f0dde1cf1720f6b00bf3cb5d2c2b990aac6de00c90d9465746afc3e03d5"},{"path":"src/led_strip_rmt_dev.c","size":8925,"hash":"0e69d4743e65956ef2494d1347b81b99f283e0a79d6d341733fd1d58c1c6e97e"},{"path":"src/led_strip_rmt_encoder.c","size":8080,"hash":"4ab03dfbba4a90f392af3234665f76ccd21c004c61f5575e1e428354512d1748"},{"path":"src/led_strip_rmt_encoder.h","size":977,"hash":"690381c35ace2703a5c7156f6547a8524f4cbfe5bef40be619e2097960120a40"},{"path":"src/led_strip_spi_dev.c","size":11600,"hash":"79a4e4c42185afdbdf2163bd945a6339bf09965a85fb20525b3d7b106d695ab2"},{"path":"examples/led_strip_rmt_ws2812/CMakeLists.txt","size":140,"hash":"526f16308e57fafd25d0fd79d872152a9214c28967f78aa9c94ebe9e73040940"},{"path":"examples/led_strip_rmt_ws2812/README.md","size":1200,"hash":"a5f39b31c5f7cbf548ee31b61ab22e430a6c823404c0ddb113703512bcb3ad3c"},{"path":"examples/led_strip_spi_ws2812/CMakeLists.txt","size":140,"hash":"61255dc48f295f09e84abd7895ae5767763ac3decb4b4584e38681ea877427e8"},{"path":"examples/led_strip_spi_ws2812/README.md","size":1201,"hash":"2c02a29197cd1f2d4af4c4c9cd44677e303b0e168a1773eef9fc3fdb39377d27"},{"path":"examples/led_strip_spi_ws2812/main/CMakeLists.txt","size":99,"hash":"34e7f83d26bca924c629ea2012e6f200b415d486907863fe936d94872ff739eb"},{"path":"examples/led_strip_spi_ws2812/main/idf_component.yml","size":68,"hash":"a0c6b9b94056e8459a9acb8d7828540b36b4f7fe9ced9011ea97ba23b2fc96d4"},{"path":"examples/led_strip_spi_ws2812/main/led_strip_spi_ws2812_main.c","size":2808,"hash":"ef7ee688e7e1f451879a7b238b2a7133ccf880adb6d0e551328150acf86f656d"},{"path":"examples/led_strip_rmt_ws2812/main/CMakeLists.txt","size":99,"hash":"8960b68811805d3aa40e1a7f44ddf7400c0d0731829b6d2b3b1584d8dcd3b392"},{"path":"examples/led_strip_rmt_ws2812/main/idf_component.yml","size":53,"hash":"d52c7e09ecb7a6e4946fb6e697d6d7127918d4334858973f8c7434b1d2f120f0"},{"path":"examples/led_strip_rmt_ws2812/main/led_strip_rmt_ws2812_main.c","size":3253,"hash":"8835bd39d38dac8fb27c5e1298cb12ddf4c6ed430b4a2a1e061334f56d77f470"},{"path":"docs/src/SUMMARY.md","size":110,"hash":"b3a38ed25d2e5187928554682b1bd7154444e1bc1ce8183e6a3d328e720f7b61"},{"path":"docs/src/api.md","size":128,"hash":"d06c809c85c02f6ae22bd090331e1150dad89bd57034f056dbf3df0449cdc22b"},{"path":"docs/src/index.md","size":2967,"hash":"db944dabd24b1faa4d61a8f8db4f734334cefc2d1efb6d023a51fb94d1c3311f"}]}

View File

@@ -0,0 +1,26 @@
include($ENV{IDF_PATH}/tools/cmake/version.cmake)
set(srcs "src/led_strip_api.c")
set(public_requires)
if(CONFIG_SOC_RMT_SUPPORTED)
list(APPEND srcs "src/led_strip_rmt_dev.c" "src/led_strip_rmt_encoder.c")
endif()
# the SPI backend driver relies on some feature that was available in IDF 5.1
if("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER_EQUAL "5.1")
if(CONFIG_SOC_GPSPI_SUPPORTED)
list(APPEND srcs "src/led_strip_spi_dev.c")
endif()
endif()
# Starting from esp-idf v5.3, the RMT and SPI drivers are moved to separate components
if("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER_EQUAL "5.3")
list(APPEND public_requires "esp_driver_rmt" "esp_driver_spi")
else()
list(APPEND public_requires "driver")
endif()
idf_component_register(SRCS ${srcs}
INCLUDE_DIRS "include" "interface"
REQUIRES ${public_requires})

View File

@@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@@ -0,0 +1,23 @@
# LED Strip Driver
[![Component Registry](https://components.espressif.com/components/espressif/led_strip/badge.svg)](https://components.espressif.com/components/espressif/led_strip)
This driver is designed for addressable LEDs like [WS2812](http://www.world-semi.com/Certifications/WS2812B.html), where each LED is controlled by a single data line.
## Supported Backend Peripherals
The LED strip driver supports two different backend peripherals to generate the timing signals required by addressable LEDs:
### The [RMT](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/rmt.html) Peripheral
This is the most economical way to drive the LEDs because it only consumes one RMT channel, leaving other channels free to use. However, the memory usage increases dramatically with the number of LEDs. If the RMT hardware can't be assist by DMA, the driver will going into interrupt very frequently, thus result in a high CPU usage. What's worse, if the RMT interrupt is delayed or not serviced in time (e.g. if Wi-Fi interrupt happens on the same CPU core), the RMT transaction will be corrupted and the LEDs will display incorrect colors. If you want to use RMT to drive a large number of LEDs, you'd better to enable the DMA feature if possible [^1].
### The [SPI](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/spi_master.html) Peripheral
SPI peripheral can also be used to generate the timing required by the LED strip, in a so-called "Clock-less" mode. However this backend is not as economical as the RMT one, because it will take up the whole **bus**. You **CANNOT** connect other devices to the same SPI bus if it's been used by the led_strip, because the led_strip doesn't have the concept of "Chip Select".
## Documentation
For detailed information about the LED Strip component, including API reference and user guides, please visit:
- **Programming Guide & API Reference**: [LED Strip Documentation](https://espressif.github.io/idf-extra-components/latest/led_strip/index.html)

View File

@@ -0,0 +1,30 @@
# Set this to the header file you want
INPUT = \
../include/ \
../interface/
# The output directory for the generated XML documentation
OUTPUT_DIRECTORY = doxygen_output
# Warning-related settings, it's recommended to keep them enabled
WARN_IF_UNDOC_ENUM_VAL = YES
WARN_AS_ERROR = YES
# Other common settings
FULL_PATH_NAMES = YES
STRIP_FROM_PATH = ../
STRIP_FROM_INC_PATH = ../
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = YES
OPTIMIZE_OUTPUT_FOR_C = YES
EXPAND_ONLY_PREDEF = YES
EXTRACT_ALL = YES
PREDEFINED = $(ENV_DOXYGEN_DEFINES)
HAVE_DOT = NO
GENERATE_XML = YES
XML_OUTPUT = xml
GENERATE_HTML = NO
HAVE_DOT = NO
GENERATE_LATEX = NO
QUIET = YES
MARKDOWN_SUPPORT = YES

View File

@@ -0,0 +1,8 @@
[book]
title = "LED Strip Documentation"
language = "en"
[output.html]
default-theme = "light"
git-repository-url = "https://github.com/espressif/idf-extra-components/tree/master/led_strip"
edit-url-template = "https://github.com/espressif/idf-extra-components/edit/master/led_strip/docs/{path}"

View File

@@ -0,0 +1,13 @@
# Summary
---
# Programming Guide
- [LED Strip](index.md)
---
# API Reference
- [API Reference](api.md)

View File

@@ -0,0 +1,9 @@
# API Reference
<div class="warning">
This file is automatically generated by esp-doxybook.
DO NOT edit it manually.
</div>

View File

@@ -0,0 +1,75 @@
# LED Strip Programming Guide
## Allocate LED Strip Object with RMT Backend
```c
#define BLINK_GPIO 0
/// LED strip common configuration
led_strip_config_t strip_config = {
.strip_gpio_num = BLINK_GPIO, // The GPIO that connected to the LED strip's data line
.max_leds = 1, // The number of LEDs in the strip,
.led_model = LED_MODEL_WS2812, // LED strip model, it determines the bit timing
.color_component_format = LED_STRIP_COLOR_COMPONENT_FMT_GRB, // The color component format is G-R-B
.flags = {
.invert_out = false, // don't invert the output signal
}
};
/// RMT backend specific configuration
led_strip_rmt_config_t rmt_config = {
.clk_src = RMT_CLK_SRC_DEFAULT, // different clock source can lead to different power consumption
.resolution_hz = 10 * 1000 * 1000, // RMT counter clock frequency: 10MHz
.mem_block_symbols = 64, // the memory size of each RMT channel, in words (4 bytes)
.flags = {
.with_dma = false, // DMA feature is available on chips like ESP32-S3/P4
}
};
/// Create the LED strip object
led_strip_handle_t led_strip = NULL;
ESP_ERROR_CHECK(led_strip_new_rmt_device(&strip_config, &rmt_config, &led_strip));
```
---
You can create multiple LED strip objects with different GPIOs and pixel numbers. The backend driver will automatically allocate sufficient RMT channels for you wherever possible. If the RMT channels are not enough, the [led_strip_new_rmt_device](api.md#function-led_strip_new_rmt_device) will return an error.
## Allocate LED Strip Object with SPI Backend
```c
#define BLINK_GPIO 0
/// LED strip common configuration
led_strip_config_t strip_config = {
.strip_gpio_num = BLINK_GPIO, // The GPIO that connected to the LED strip's data line
.max_leds = 1, // The number of LEDs in the strip,
.led_model = LED_MODEL_WS2812, // LED strip model, it determines the bit timing
.color_component_format = LED_STRIP_COLOR_COMPONENT_FMT_GRB, // The color component format is G-R-B
.flags = {
.invert_out = false, // don't invert the output signal
}
};
/// SPI backend specific configuration
led_strip_spi_config_t spi_config = {
.clk_src = SPI_CLK_SRC_DEFAULT, // different clock source can lead to different power consumption
.spi_bus = SPI2_HOST, // SPI bus ID
.flags = {
.with_dma = true, // Using DMA can improve performance and help drive more LEDs
}
};
/// Create the LED strip object
led_strip_handle_t led_strip = NULL;
ESP_ERROR_CHECK(led_strip_new_spi_device(&strip_config, &spi_config, &led_strip));
```
---
The number of LED strip objects can be created depends on how many free SPI controllers are free to use in your project.
## FAQ
- How to set the brightness of the LED strip?
- You can tune the brightness by scaling the value of each R-G-B element with a **same** factor. But pay attention to the overflow of the value.

View File

@@ -0,0 +1,6 @@
cmake_minimum_required(VERSION 3.16)
set(COMPONENTS main)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(led_strip_rmt_ws2812)

View File

@@ -0,0 +1,31 @@
# LED Strip Example (RMT backend + WS2812)
This example demonstrates how to blink the WS2812 LED using the [led_strip](https://components.espressif.com/component/espressif/led_strip) component.
## How to Use Example
### Hardware Required
* A development board with Espressif SoC
* A USB cable for Power supply and programming
* WS2812 LED strip
### Configure the Example
Before project configuration and build, be sure to set the correct chip target using `idf.py set-target <chip_name>`. Then assign the proper GPIO in the [source file](main/led_strip_rmt_ws2812_main.c). If your led strip has multiple LEDs, don't forget update the number.
### Build and Flash
Run `idf.py -p PORT build flash monitor` to build, flash and monitor the project.
(To exit the serial monitor, type ``Ctrl-]``.)
See the [Getting Started Guide](https://docs.espressif.com/projects/esp-idf/en/latest/get-started/index.html) for full steps to configure and use ESP-IDF to build projects.
## Example Output
```text
I (299) gpio: GPIO[8]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (309) example: Created LED strip object with RMT backend
I (309) example: Start blinking LED strip
```

View File

@@ -0,0 +1,2 @@
idf_component_register(SRCS "led_strip_rmt_ws2812_main.c"
INCLUDE_DIRS ".")

View File

@@ -0,0 +1,3 @@
dependencies:
espressif/led_strip:
version: ^3

View File

@@ -0,0 +1,89 @@
/*
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Unlicense OR CC0-1.0
*/
#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "led_strip.h"
#include "esp_log.h"
#include "esp_err.h"
// Set to 1 to use DMA for driving the LED strip, 0 otherwise
// Please note the RMT DMA feature is only available on chips e.g. ESP32-S3/P4
#define LED_STRIP_USE_DMA 0
#if LED_STRIP_USE_DMA
// Numbers of the LED in the strip
#define LED_STRIP_LED_COUNT 256
#define LED_STRIP_MEMORY_BLOCK_WORDS 1024 // this determines the DMA block size
#else
// Numbers of the LED in the strip
#define LED_STRIP_LED_COUNT 24
#define LED_STRIP_MEMORY_BLOCK_WORDS 0 // let the driver choose a proper memory block size automatically
#endif // LED_STRIP_USE_DMA
// GPIO assignment
#define LED_STRIP_GPIO_PIN 2
// 10MHz resolution, 1 tick = 0.1us (led strip needs a high resolution)
#define LED_STRIP_RMT_RES_HZ (10 * 1000 * 1000)
static const char *TAG = "example";
led_strip_handle_t configure_led(void)
{
// LED strip general initialization, according to your led board design
led_strip_config_t strip_config = {
.strip_gpio_num = LED_STRIP_GPIO_PIN, // The GPIO that connected to the LED strip's data line
.max_leds = LED_STRIP_LED_COUNT, // The number of LEDs in the strip,
.led_model = LED_MODEL_WS2812, // LED strip model
.color_component_format = LED_STRIP_COLOR_COMPONENT_FMT_GRB, // The color order of the strip: GRB
.flags = {
.invert_out = false, // don't invert the output signal
}
};
// LED strip backend configuration: RMT
led_strip_rmt_config_t rmt_config = {
.clk_src = RMT_CLK_SRC_DEFAULT, // different clock source can lead to different power consumption
.resolution_hz = LED_STRIP_RMT_RES_HZ, // RMT counter clock frequency
.mem_block_symbols = LED_STRIP_MEMORY_BLOCK_WORDS, // the memory block size used by the RMT channel
.flags = {
.with_dma = LED_STRIP_USE_DMA, // Using DMA can improve performance when driving more LEDs
}
};
// LED Strip object handle
led_strip_handle_t led_strip;
ESP_ERROR_CHECK(led_strip_new_rmt_device(&strip_config, &rmt_config, &led_strip));
ESP_LOGI(TAG, "Created LED strip object with RMT backend");
return led_strip;
}
void app_main(void)
{
led_strip_handle_t led_strip = configure_led();
bool led_on_off = false;
ESP_LOGI(TAG, "Start blinking LED strip");
while (1) {
if (led_on_off) {
/* Set the LED pixel using RGB from 0 (0%) to 255 (100%) for each color */
for (int i = 0; i < LED_STRIP_LED_COUNT; i++) {
ESP_ERROR_CHECK(led_strip_set_pixel(led_strip, i, 5, 5, 5));
}
/* Refresh the strip to send data */
ESP_ERROR_CHECK(led_strip_refresh(led_strip));
ESP_LOGI(TAG, "LED ON!");
} else {
/* Set all LED off to clear all pixels */
ESP_ERROR_CHECK(led_strip_clear(led_strip));
ESP_LOGI(TAG, "LED OFF!");
}
led_on_off = !led_on_off;
vTaskDelay(pdMS_TO_TICKS(500));
}
}

View File

@@ -0,0 +1,6 @@
cmake_minimum_required(VERSION 3.16)
set(COMPONENTS main)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(led_strip_spi_ws2812)

View File

@@ -0,0 +1,31 @@
# LED Strip Example (SPI backend + WS2812)
This example demonstrates how to blink the WS2812 LED using the [led_strip](https://components.espressif.com/component/espressif/led_strip) component.
## How to Use Example
### Hardware Required
* A development board with Espressif SoC
* A USB cable for Power supply and programming
* WS2812 LED strip
### Configure the Example
Before project configuration and build, be sure to set the correct chip target using `idf.py set-target <chip_name>`. Then assign the proper GPIO in the [source file](main/led_strip_spi_ws2812_main.c). If your led strip has multiple LEDs, don't forget update the number.
### Build and Flash
Run `idf.py -p PORT build flash monitor` to build, flash and monitor the project.
(To exit the serial monitor, type ``Ctrl-]``.)
See the [Getting Started Guide](https://docs.espressif.com/projects/esp-idf/en/latest/get-started/index.html) for full steps to configure and use ESP-IDF to build projects.
## Example Output
```text
I (299) gpio: GPIO[14]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (309) example: Created LED strip object with SPI backend
I (309) example: Start blinking LED strip
```

View File

@@ -0,0 +1,2 @@
idf_component_register(SRCS "led_strip_spi_ws2812_main.c"
INCLUDE_DIRS ".")

View File

@@ -0,0 +1,4 @@
dependencies:
espressif/led_strip:
version: ^3
idf: '>=5.1'

View File

@@ -0,0 +1,81 @@
/*
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Unlicense OR CC0-1.0
*/
#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "led_strip.h"
#include "esp_log.h"
#include "esp_err.h"
// GPIO assignment
#define LED_STRIP_GPIO_PIN 2
// Numbers of the LED in the strip
#define LED_STRIP_LED_COUNT 24
static const char *TAG = "example";
led_strip_handle_t configure_led(void)
{
// LED strip general initialization, according to your led board design
led_strip_config_t strip_config = {
.strip_gpio_num = LED_STRIP_GPIO_PIN, // The GPIO that connected to the LED strip's data line
.max_leds = LED_STRIP_LED_COUNT, // The number of LEDs in the strip,
.led_model = LED_MODEL_WS2812, // LED strip model
// set the color order of the strip: GRB
.color_component_format = {
.format = {
.r_pos = 1, // red is the second byte in the color data
.g_pos = 0, // green is the first byte in the color data
.b_pos = 2, // blue is the third byte in the color data
.num_components = 3, // total 3 color components
},
},
.flags = {
.invert_out = false, // don't invert the output signal
}
};
// LED strip backend configuration: SPI
led_strip_spi_config_t spi_config = {
.clk_src = SPI_CLK_SRC_DEFAULT, // different clock source can lead to different power consumption
.spi_bus = SPI2_HOST, // SPI bus ID
.flags = {
.with_dma = true, // Using DMA can improve performance and help drive more LEDs
}
};
// LED Strip object handle
led_strip_handle_t led_strip;
ESP_ERROR_CHECK(led_strip_new_spi_device(&strip_config, &spi_config, &led_strip));
ESP_LOGI(TAG, "Created LED strip object with SPI backend");
return led_strip;
}
void app_main(void)
{
led_strip_handle_t led_strip = configure_led();
bool led_on_off = false;
ESP_LOGI(TAG, "Start blinking LED strip");
while (1) {
if (led_on_off) {
/* Set the LED pixel using RGB from 0 (0%) to 255 (100%) for each color */
for (int i = 0; i < LED_STRIP_LED_COUNT; i++) {
ESP_ERROR_CHECK(led_strip_set_pixel(led_strip, i, 5, 5, 5));
}
/* Refresh the strip to send data */
ESP_ERROR_CHECK(led_strip_refresh(led_strip));
ESP_LOGI(TAG, "LED ON!");
} else {
/* Set all LED off to clear all pixels */
ESP_ERROR_CHECK(led_strip_clear(led_strip));
ESP_LOGI(TAG, "LED OFF!");
}
led_on_off = !led_on_off;
vTaskDelay(pdMS_TO_TICKS(500));
}
}

View File

@@ -0,0 +1,11 @@
dependencies:
idf: '>=5.0'
description: Driver for Addressable LED Strip (WS2812, etc)
documentation: https://espressif.github.io/idf-extra-components/latest/led_strip/index.html
issues: https://github.com/espressif/idf-extra-components/issues
repository: git://github.com/espressif/idf-extra-components.git
repository_info:
commit_sha: 7cd447361ca2f0a1c01aa3089e3031f6171b6c7e
path: led_strip
url: https://github.com/espressif/idf-extra-components/tree/master/led_strip
version: 3.0.3

View File

@@ -0,0 +1,123 @@
/*
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include <stdint.h>
#include "esp_err.h"
#include "led_strip_rmt.h"
#include "led_strip_spi.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Set RGB for a specific pixel
*
* @param strip: LED strip
* @param index: index of pixel to set
* @param red: red part of color
* @param green: green part of color
* @param blue: blue part of color
*
* @return
* - ESP_OK: Set RGB for a specific pixel successfully
* - ESP_ERR_INVALID_ARG: Set RGB for a specific pixel failed because of invalid parameters
* - ESP_FAIL: Set RGB for a specific pixel failed because other error occurred
*/
esp_err_t led_strip_set_pixel(led_strip_handle_t strip, uint32_t index, uint32_t red, uint32_t green, uint32_t blue);
/**
* @brief Set RGBW for a specific pixel
*
* @note Only call this function if your led strip does have the white component (e.g. SK6812-RGBW)
* @note Also see `led_strip_set_pixel` if you only want to specify the RGB part of the color and bypass the white component
*
* @param strip: LED strip
* @param index: index of pixel to set
* @param red: red part of color
* @param green: green part of color
* @param blue: blue part of color
* @param white: separate white component
*
* @return
* - ESP_OK: Set RGBW color for a specific pixel successfully
* - ESP_ERR_INVALID_ARG: Set RGBW color for a specific pixel failed because of an invalid argument
* - ESP_FAIL: Set RGBW color for a specific pixel failed because other error occurred
*/
esp_err_t led_strip_set_pixel_rgbw(led_strip_handle_t strip, uint32_t index, uint32_t red, uint32_t green, uint32_t blue, uint32_t white);
/**
* @brief Set HSV for a specific pixel
*
* @param strip: LED strip
* @param index: index of pixel to set
* @param hue: hue part of color (0 - 360)
* @param saturation: saturation part of color (0 - 255, rescaled from 0 - 1. e.g. saturation = 0.5, rescaled to 127)
* @param value: value part of color (0 - 255, rescaled from 0 - 1. e.g. value = 0.5, rescaled to 127)
*
* @return
* - ESP_OK: Set HSV color for a specific pixel successfully
* - ESP_ERR_INVALID_ARG: Set HSV color for a specific pixel failed because of an invalid argument
* - ESP_FAIL: Set HSV color for a specific pixel failed because other error occurred
*/
esp_err_t led_strip_set_pixel_hsv(led_strip_handle_t strip, uint32_t index, uint16_t hue, uint8_t saturation, uint8_t value);
/**
* @brief Set HSV for a specific pixel in 16-bit resolution
*
* @param strip: LED strip
* @param index: index of pixel to set
* @param hue: hue part of color (0 - 360)
* @param saturation: saturation part of color (0 - 65535, rescaled from 0 - 1. e.g. saturation = 0.5, rescaled to 32767)
* @param value: value part of color (0 - 65535, rescaled from 0 - 1. e.g. value = 0.5, rescaled to 32767)
*
* @return
* - ESP_OK: Set HSV color for a specific pixel successfully
* - ESP_ERR_INVALID_ARG: Set HSV color for a specific pixel failed because of an invalid argument
* - ESP_FAIL: Set HSV color for a specific pixel failed because other error occurred
*/
esp_err_t led_strip_set_pixel_hsv_16(led_strip_handle_t strip, uint32_t index, uint16_t hue, uint16_t saturation, uint16_t value);
/**
* @brief Refresh memory colors to LEDs
*
* @param strip: LED strip
*
* @return
* - ESP_OK: Refresh successfully
* - ESP_FAIL: Refresh failed because some other error occurred
*
* @note:
* After updating the LED colors in the memory, a following invocation of this API is needed to flush colors to strip.
*/
esp_err_t led_strip_refresh(led_strip_handle_t strip);
/**
* @brief Clear LED strip (turn off all LEDs)
*
* @param strip: LED strip
*
* @return
* - ESP_OK: Clear LEDs successfully
* - ESP_FAIL: Clear LEDs failed because some other error occurred
*/
esp_err_t led_strip_clear(led_strip_handle_t strip);
/**
* @brief Free LED strip resources
*
* @param strip: LED strip
*
* @return
* - ESP_OK: Free resources successfully
* - ESP_FAIL: Free resources failed because error occurred
*/
esp_err_t led_strip_del(led_strip_handle_t strip);
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,47 @@
/*
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include <stdint.h>
#include "esp_err.h"
#include "led_strip_types.h"
#include "esp_idf_version.h"
#include "driver/rmt_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief LED Strip RMT specific configuration
*/
typedef struct {
rmt_clock_source_t clk_src; /*!< RMT clock source */
uint32_t resolution_hz; /*!< RMT tick resolution, if set to zero, a default resolution (10MHz) will be applied */
size_t mem_block_symbols; /*!< How many RMT symbols can one RMT channel hold at one time. Set to 0 will fallback to use the default size. */
/*!< Extra RMT specific driver flags */
struct led_strip_rmt_extra_config {
uint32_t with_dma: 1; /*!< Use DMA to transmit data */
} flags; /*!< Extra driver flags */
} led_strip_rmt_config_t;
/**
* @brief Create LED strip based on RMT TX channel
*
* @param led_config LED strip configuration
* @param rmt_config RMT specific configuration
* @param ret_strip Returned LED strip handle
* @return
* - ESP_OK: create LED strip handle successfully
* - ESP_ERR_INVALID_ARG: create LED strip handle failed because of invalid argument
* - ESP_ERR_NO_MEM: create LED strip handle failed because of out of memory
* - ESP_FAIL: create LED strip handle failed because some other error
*/
esp_err_t led_strip_new_rmt_device(const led_strip_config_t *led_config, const led_strip_rmt_config_t *rmt_config, led_strip_handle_t *ret_strip);
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,47 @@
/*
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include <stdint.h>
#include "esp_err.h"
#include "driver/spi_master.h"
#include "led_strip_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief LED Strip SPI specific configuration
*/
typedef struct {
spi_clock_source_t clk_src; /*!< SPI clock source */
spi_host_device_t spi_bus; /*!< SPI bus ID. Which buses are available depends on the specific chip */
struct {
uint32_t with_dma: 1; /*!< Use DMA to transmit data */
} flags; /*!< Extra driver flags */
} led_strip_spi_config_t;
/**
* @brief Create LED strip based on SPI MOSI channel
*
* @note Although only the MOSI line is used for generating the signal, the whole SPI bus can't be used for other purposes.
*
* @param led_config LED strip configuration
* @param spi_config SPI specific configuration
* @param ret_strip Returned LED strip handle
* @return
* - ESP_OK: create LED strip handle successfully
* - ESP_ERR_INVALID_ARG: create LED strip handle failed because of invalid argument
* - ESP_ERR_NOT_SUPPORTED: create LED strip handle failed because of unsupported configuration
* - ESP_ERR_NO_MEM: create LED strip handle failed because of out of memory
* - ESP_FAIL: create LED strip handle failed because some other error
*/
esp_err_t led_strip_new_spi_device(const led_strip_config_t *led_config, const led_strip_spi_config_t *spi_config, led_strip_handle_t *ret_strip);
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,76 @@
/*
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Type of LED strip handle
*/
typedef struct led_strip_t *led_strip_handle_t;
/**
* @brief LED strip model
* @note Different led model may have different timing parameters, so we need to distinguish them.
*/
typedef enum {
LED_MODEL_WS2812, /*!< LED strip model: WS2812 */
LED_MODEL_SK6812, /*!< LED strip model: SK6812 */
LED_MODEL_WS2811, /*!< LED strip model: WS2811 */
LED_MODEL_WS2816, /*!< LED strip model: WS2816 */
LED_MODEL_INVALID /*!< Invalid LED strip model */
} led_model_t;
/**
* @brief LED color component format
* @note The format is used to specify the order of color components in each pixel, also the number of color components.
*/
typedef union {
struct format_layout {
uint32_t r_pos: 2; /*!< Position of the red channel in the color order: 0~3 */
uint32_t g_pos: 2; /*!< Position of the green channel in the color order: 0~3 */
uint32_t b_pos: 2; /*!< Position of the blue channel in the color order: 0~3 */
uint32_t w_pos: 2; /*!< Position of the white channel in the color order: 0~3 */
uint32_t reserved: 19; /*!< Reserved */
uint32_t bytes_per_color: 2; /*!< Bytes per color component: 1 or 2. If set to 0, it will fallback to 1 */
uint32_t num_components: 3; /*!< Number of color components per pixel: 3 or 4. If set to 0, it will fallback to 3 */
} format; /*!< Format layout */
uint32_t format_id; /*!< Format ID */
} led_color_component_format_t;
/// Helper macros to set the color component format
#define LED_STRIP_COLOR_COMPONENT_FMT_GRB (led_color_component_format_t){.format = {.r_pos = 1, .g_pos = 0, .b_pos = 2, .w_pos = 3, .reserved = 0, .bytes_per_color = 1, .num_components = 3}}
#define LED_STRIP_COLOR_COMPONENT_FMT_GRB_16 (led_color_component_format_t){.format = {.r_pos = 1, .g_pos = 0, .b_pos = 2, .w_pos = 3, .reserved = 0, .bytes_per_color = 2, .num_components = 3}}
#define LED_STRIP_COLOR_COMPONENT_FMT_GRBW (led_color_component_format_t){.format = {.r_pos = 1, .g_pos = 0, .b_pos = 2, .w_pos = 3, .reserved = 0, .bytes_per_color = 1, .num_components = 4}}
#define LED_STRIP_COLOR_COMPONENT_FMT_GRBW_16 (led_color_component_format_t){.format = {.r_pos = 1, .g_pos = 0, .b_pos = 2, .w_pos = 3, .reserved = 0, .bytes_per_color = 2, .num_components = 4}}
#define LED_STRIP_COLOR_COMPONENT_FMT_RGB (led_color_component_format_t){.format = {.r_pos = 0, .g_pos = 1, .b_pos = 2, .w_pos = 3, .reserved = 0, .bytes_per_color = 1, .num_components = 3}}
#define LED_STRIP_COLOR_COMPONENT_FMT_RGB_16 (led_color_component_format_t){.format = {.r_pos = 0, .g_pos = 1, .b_pos = 2, .w_pos = 3, .reserved = 0, .bytes_per_color = 2, .num_components = 3}}
#define LED_STRIP_COLOR_COMPONENT_FMT_RGBW (led_color_component_format_t){.format = {.r_pos = 0, .g_pos = 1, .b_pos = 2, .w_pos = 3, .reserved = 0, .bytes_per_color = 1, .num_components = 4}}
#define LED_STRIP_COLOR_COMPONENT_FMT_RGBW_16 (led_color_component_format_t){.format = {.r_pos = 0, .g_pos = 1, .b_pos = 2, .w_pos = 3, .reserved = 0, .bytes_per_color = 2, .num_components = 4}}
/**
* @brief LED Strip common configurations
* The common configurations are not specific to any backend peripheral.
*/
typedef struct {
int strip_gpio_num; /*!< GPIO number that used by LED strip */
uint32_t max_leds; /*!< Maximum number of LEDs that can be controlled in a single strip */
led_model_t led_model; /*!< Specifies the LED strip model (e.g., WS2812, SK6812) */
led_color_component_format_t color_component_format; /*!< Specifies the order of color components in each pixel.
Use helper macros like `LED_STRIP_COLOR_COMPONENT_FMT_GRB` to set the format */
/*!< LED strip extra driver flags */
struct led_strip_extra_flags {
uint32_t invert_out: 1; /*!< Invert output signal */
} flags; /*!< Extra driver flags */
} led_strip_config_t;
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,95 @@
/*
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include <stdint.h>
#include "esp_err.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct led_strip_t led_strip_t; /*!< Type of LED strip */
/**
* @brief LED strip interface definition
*/
struct led_strip_t {
/**
* @brief Set RGB for a specific pixel
*
* @param strip: LED strip
* @param index: index of pixel to set
* @param red: red part of color
* @param green: green part of color
* @param blue: blue part of color
*
* @return
* - ESP_OK: Set RGB for a specific pixel successfully
* - ESP_ERR_INVALID_ARG: Set RGB for a specific pixel failed because of invalid parameters
* - ESP_FAIL: Set RGB for a specific pixel failed because other error occurred
*/
esp_err_t (*set_pixel)(led_strip_t *strip, uint32_t index, uint32_t red, uint32_t green, uint32_t blue);
/**
* @brief Set RGBW for a specific pixel. Similar to `set_pixel` but also set the white component
*
* @param strip: LED strip
* @param index: index of pixel to set
* @param red: red part of color
* @param green: green part of color
* @param blue: blue part of color
* @param white: separate white component
*
* @return
* - ESP_OK: Set RGBW color for a specific pixel successfully
* - ESP_ERR_INVALID_ARG: Set RGBW color for a specific pixel failed because of an invalid argument
* - ESP_FAIL: Set RGBW color for a specific pixel failed because other error occurred
*/
esp_err_t (*set_pixel_rgbw)(led_strip_t *strip, uint32_t index, uint32_t red, uint32_t green, uint32_t blue, uint32_t white);
/**
* @brief Refresh memory colors to LEDs
*
* @param strip: LED strip
* @param timeout_ms: timeout value for refreshing task
*
* @return
* - ESP_OK: Refresh successfully
* - ESP_FAIL: Refresh failed because some other error occurred
*
* @note:
* After updating the LED colors in the memory, a following invocation of this API is needed to flush colors to strip.
*/
esp_err_t (*refresh)(led_strip_t *strip);
/**
* @brief Clear LED strip (turn off all LEDs)
*
* @param strip: LED strip
* @param timeout_ms: timeout value for clearing task
*
* @return
* - ESP_OK: Clear LEDs successfully
* - ESP_FAIL: Clear LEDs failed because some other error occurred
*/
esp_err_t (*clear)(led_strip_t *strip);
/**
* @brief Free LED strip resources
*
* @param strip: LED strip
*
* @return
* - ESP_OK: Free resources successfully
* - ESP_FAIL: Free resources failed because error occurred
*/
esp_err_t (*del)(led_strip_t *strip);
};
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,147 @@
/*
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "esp_log.h"
#include "esp_check.h"
#include "led_strip.h"
#include "led_strip_interface.h"
static const char *TAG = "led_strip";
esp_err_t led_strip_set_pixel(led_strip_handle_t strip, uint32_t index, uint32_t red, uint32_t green, uint32_t blue)
{
ESP_RETURN_ON_FALSE(strip, ESP_ERR_INVALID_ARG, TAG, "invalid argument");
return strip->set_pixel(strip, index, red, green, blue);
}
esp_err_t led_strip_set_pixel_hsv(led_strip_handle_t strip, uint32_t index, uint16_t hue, uint8_t saturation, uint8_t value)
{
ESP_RETURN_ON_FALSE(strip, ESP_ERR_INVALID_ARG, TAG, "invalid argument");
uint32_t red = 0;
uint32_t green = 0;
uint32_t blue = 0;
uint32_t rgb_max = value;
uint32_t rgb_min = rgb_max * (255 - saturation) / 255;
uint32_t i = hue / 60;
uint32_t diff = hue % 60;
// RGB adjustment amount by hue
uint32_t rgb_adj = (rgb_max - rgb_min) * diff / 60;
switch (i) {
case 0:
red = rgb_max;
green = rgb_min + rgb_adj;
blue = rgb_min;
break;
case 1:
red = rgb_max - rgb_adj;
green = rgb_max;
blue = rgb_min;
break;
case 2:
red = rgb_min;
green = rgb_max;
blue = rgb_min + rgb_adj;
break;
case 3:
red = rgb_min;
green = rgb_max - rgb_adj;
blue = rgb_max;
break;
case 4:
red = rgb_min + rgb_adj;
green = rgb_min;
blue = rgb_max;
break;
default:
red = rgb_max;
green = rgb_min;
blue = rgb_max - rgb_adj;
break;
}
return strip->set_pixel(strip, index, red, green, blue);
}
esp_err_t led_strip_set_pixel_hsv_16(led_strip_handle_t strip, uint32_t index, uint16_t hue, uint16_t saturation, uint16_t value)
{
ESP_RETURN_ON_FALSE(strip, ESP_ERR_INVALID_ARG, TAG, "invalid argument");
uint32_t red = 0;
uint32_t green = 0;
uint32_t blue = 0;
uint32_t rgb_max = value;
uint32_t rgb_min = rgb_max * (65535 - saturation) / 65535;
uint32_t i = hue / 60;
uint32_t diff = hue % 60;
// RGB adjustment amount by hue
uint32_t rgb_adj = (rgb_max - rgb_min) * diff / 60;
switch (i) {
case 0:
red = rgb_max;
green = rgb_min + rgb_adj;
blue = rgb_min;
break;
case 1:
red = rgb_max - rgb_adj;
green = rgb_max;
blue = rgb_min;
break;
case 2:
red = rgb_min;
green = rgb_max;
blue = rgb_min + rgb_adj;
break;
case 3:
red = rgb_min;
green = rgb_max - rgb_adj;
blue = rgb_max;
break;
case 4:
red = rgb_min + rgb_adj;
green = rgb_min;
blue = rgb_max;
break;
default:
red = rgb_max;
green = rgb_min;
blue = rgb_max - rgb_adj;
break;
}
return strip->set_pixel(strip, index, red, green, blue);
}
esp_err_t led_strip_set_pixel_rgbw(led_strip_handle_t strip, uint32_t index, uint32_t red, uint32_t green, uint32_t blue, uint32_t white)
{
ESP_RETURN_ON_FALSE(strip, ESP_ERR_INVALID_ARG, TAG, "invalid argument");
return strip->set_pixel_rgbw(strip, index, red, green, blue, white);
}
esp_err_t led_strip_refresh(led_strip_handle_t strip)
{
ESP_RETURN_ON_FALSE(strip, ESP_ERR_INVALID_ARG, TAG, "invalid argument");
return strip->refresh(strip);
}
esp_err_t led_strip_clear(led_strip_handle_t strip)
{
ESP_RETURN_ON_FALSE(strip, ESP_ERR_INVALID_ARG, TAG, "invalid argument");
return strip->clear(strip);
}
esp_err_t led_strip_del(led_strip_handle_t strip)
{
ESP_RETURN_ON_FALSE(strip, ESP_ERR_INVALID_ARG, TAG, "invalid argument");
return strip->del(strip);
}

View File

@@ -0,0 +1,198 @@
/*
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdlib.h>
#include <string.h>
#include <sys/cdefs.h>
#include "esp_log.h"
#include "esp_check.h"
#include "driver/rmt_tx.h"
#include "led_strip.h"
#include "led_strip_interface.h"
#include "led_strip_rmt_encoder.h"
#define LED_STRIP_RMT_DEFAULT_RESOLUTION 10000000 // 10MHz resolution
#define LED_STRIP_RMT_DEFAULT_TRANS_QUEUE_SIZE 4
// the memory size of each RMT channel, in words (4 bytes)
#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2
#define LED_STRIP_RMT_DEFAULT_MEM_BLOCK_SYMBOLS 64
#else
#define LED_STRIP_RMT_DEFAULT_MEM_BLOCK_SYMBOLS 48
#endif
static const char *TAG = "led_strip_rmt";
typedef struct {
led_strip_t base;
rmt_channel_handle_t rmt_chan;
rmt_encoder_handle_t strip_encoder;
uint32_t strip_len;
uint8_t bytes_per_pixel;
led_color_component_format_t component_fmt;
uint8_t pixel_buf[];
} led_strip_rmt_obj;
static esp_err_t led_strip_rmt_set_pixel(led_strip_t *strip, uint32_t index, uint32_t red, uint32_t green, uint32_t blue)
{
led_strip_rmt_obj *rmt_strip = __containerof(strip, led_strip_rmt_obj, base);
ESP_RETURN_ON_FALSE(index < rmt_strip->strip_len, ESP_ERR_INVALID_ARG, TAG, "index out of maximum number of LEDs");
struct format_layout format = rmt_strip->component_fmt.format;
uint32_t start = index * rmt_strip->bytes_per_pixel;
uint8_t *pixel_buf = rmt_strip->pixel_buf;
uint8_t pos_bytes = format.bytes_per_color;
for (uint8_t i = 0; i < format.bytes_per_color; i++) {
uint8_t color_shift = 8 * (format.bytes_per_color - 1 - i);
pixel_buf[start + format.r_pos * pos_bytes + i] = (red >> color_shift) & 0xFF;
pixel_buf[start + format.g_pos * pos_bytes + i] = (green >> color_shift) & 0xFF;
pixel_buf[start + format.b_pos * pos_bytes + i] = (blue >> color_shift) & 0xFF;
if (format.num_components > 3) {
pixel_buf[start + format.w_pos * pos_bytes + i] = 0;
}
}
return ESP_OK;
}
static esp_err_t led_strip_rmt_set_pixel_rgbw(led_strip_t *strip, uint32_t index, uint32_t red, uint32_t green, uint32_t blue, uint32_t white)
{
led_strip_rmt_obj *rmt_strip = __containerof(strip, led_strip_rmt_obj, base);
struct format_layout format = rmt_strip->component_fmt.format;
ESP_RETURN_ON_FALSE(index < rmt_strip->strip_len, ESP_ERR_INVALID_ARG, TAG, "index out of maximum number of LEDs");
ESP_RETURN_ON_FALSE(format.num_components == 4, ESP_ERR_INVALID_ARG, TAG, "led doesn't have 4 components");
uint32_t start = index * rmt_strip->bytes_per_pixel;
uint8_t *pixel_buf = rmt_strip->pixel_buf;
uint8_t pos_bytes = format.bytes_per_color;
for (uint8_t i = 0; i < format.bytes_per_color; i++) {
uint8_t color_shift = 8 * (format.bytes_per_color - 1 - i);
pixel_buf[start + format.r_pos * pos_bytes + i] = (red >> color_shift) & 0xFF;
pixel_buf[start + format.g_pos * pos_bytes + i] = (green >> color_shift) & 0xFF;
pixel_buf[start + format.b_pos * pos_bytes + i] = (blue >> color_shift) & 0xFF;
pixel_buf[start + format.w_pos * pos_bytes + i] = (white >> color_shift) & 0xFF;
}
return ESP_OK;
}
static esp_err_t led_strip_rmt_refresh(led_strip_t *strip)
{
led_strip_rmt_obj *rmt_strip = __containerof(strip, led_strip_rmt_obj, base);
rmt_transmit_config_t tx_conf = {
.loop_count = 0,
};
ESP_RETURN_ON_ERROR(rmt_enable(rmt_strip->rmt_chan), TAG, "enable RMT channel failed");
ESP_RETURN_ON_ERROR(rmt_transmit(rmt_strip->rmt_chan, rmt_strip->strip_encoder, rmt_strip->pixel_buf,
rmt_strip->strip_len * rmt_strip->bytes_per_pixel, &tx_conf), TAG, "transmit pixels by RMT failed");
ESP_RETURN_ON_ERROR(rmt_tx_wait_all_done(rmt_strip->rmt_chan, -1), TAG, "flush RMT channel failed");
ESP_RETURN_ON_ERROR(rmt_disable(rmt_strip->rmt_chan), TAG, "disable RMT channel failed");
return ESP_OK;
}
static esp_err_t led_strip_rmt_clear(led_strip_t *strip)
{
led_strip_rmt_obj *rmt_strip = __containerof(strip, led_strip_rmt_obj, base);
// Write zero to turn off all leds
memset(rmt_strip->pixel_buf, 0, rmt_strip->strip_len * rmt_strip->bytes_per_pixel);
return led_strip_rmt_refresh(strip);
}
static esp_err_t led_strip_rmt_del(led_strip_t *strip)
{
led_strip_rmt_obj *rmt_strip = __containerof(strip, led_strip_rmt_obj, base);
ESP_RETURN_ON_ERROR(rmt_del_channel(rmt_strip->rmt_chan), TAG, "delete RMT channel failed");
ESP_RETURN_ON_ERROR(rmt_del_encoder(rmt_strip->strip_encoder), TAG, "delete strip encoder failed");
free(rmt_strip);
return ESP_OK;
}
esp_err_t led_strip_new_rmt_device(const led_strip_config_t *led_config, const led_strip_rmt_config_t *rmt_config, led_strip_handle_t *ret_strip)
{
led_strip_rmt_obj *rmt_strip = NULL;
esp_err_t ret = ESP_OK;
ESP_GOTO_ON_FALSE(led_config && rmt_config && ret_strip, ESP_ERR_INVALID_ARG, err, TAG, "invalid argument");
led_color_component_format_t component_fmt = led_config->color_component_format;
// If R/G/B order is not specified, set default GRB order as fallback
if (component_fmt.format_id == 0) {
component_fmt = LED_STRIP_COLOR_COMPONENT_FMT_GRB;
}
if (led_config->led_model == LED_MODEL_WS2816) {
component_fmt.format.bytes_per_color = 2;
}
if (component_fmt.format.bytes_per_color == 0) {
component_fmt.format.bytes_per_color = 1;
}
// check the validation of the color component format
uint8_t mask = 0;
if (component_fmt.format.num_components == 3) {
mask = BIT(component_fmt.format.r_pos) | BIT(component_fmt.format.g_pos) | BIT(component_fmt.format.b_pos);
// Check for invalid values
ESP_RETURN_ON_FALSE(mask == 0x07, ESP_ERR_INVALID_ARG, TAG, "invalid order argument");
} else if (component_fmt.format.num_components == 4) {
mask = BIT(component_fmt.format.r_pos) | BIT(component_fmt.format.g_pos) | BIT(component_fmt.format.b_pos) | BIT(component_fmt.format.w_pos);
// Check for invalid values
ESP_RETURN_ON_FALSE(mask == 0x0F, ESP_ERR_INVALID_ARG, TAG, "invalid order argument");
} else {
ESP_RETURN_ON_FALSE(false, ESP_ERR_INVALID_ARG, TAG, "invalid number of color components: %d", component_fmt.format.num_components);
}
uint8_t bytes_per_pixel = component_fmt.format.num_components;
if (component_fmt.format.bytes_per_color > 1) {
bytes_per_pixel *= component_fmt.format.bytes_per_color;
}
rmt_strip = calloc(1, sizeof(led_strip_rmt_obj) + led_config->max_leds * bytes_per_pixel);
ESP_GOTO_ON_FALSE(rmt_strip, ESP_ERR_NO_MEM, err, TAG, "no mem for rmt strip");
uint32_t resolution = rmt_config->resolution_hz ? rmt_config->resolution_hz : LED_STRIP_RMT_DEFAULT_RESOLUTION;
// for backward compatibility, if the user does not set the clk_src, use the default value
rmt_clock_source_t clk_src = RMT_CLK_SRC_DEFAULT;
if (rmt_config->clk_src) {
clk_src = rmt_config->clk_src;
}
size_t mem_block_symbols = LED_STRIP_RMT_DEFAULT_MEM_BLOCK_SYMBOLS;
// override the default value if the user sets it
if (rmt_config->mem_block_symbols) {
mem_block_symbols = rmt_config->mem_block_symbols;
}
rmt_tx_channel_config_t rmt_chan_config = {
.clk_src = clk_src,
.gpio_num = led_config->strip_gpio_num,
.mem_block_symbols = mem_block_symbols,
.resolution_hz = resolution,
.trans_queue_depth = LED_STRIP_RMT_DEFAULT_TRANS_QUEUE_SIZE,
.flags.with_dma = rmt_config->flags.with_dma,
.flags.invert_out = led_config->flags.invert_out,
};
ESP_GOTO_ON_ERROR(rmt_new_tx_channel(&rmt_chan_config, &rmt_strip->rmt_chan), err, TAG, "create RMT TX channel failed");
led_strip_encoder_config_t strip_encoder_conf = {
.resolution = resolution,
.led_model = led_config->led_model
};
ESP_GOTO_ON_ERROR(rmt_new_led_strip_encoder(&strip_encoder_conf, &rmt_strip->strip_encoder), err, TAG, "create LED strip encoder failed");
rmt_strip->component_fmt = component_fmt;
rmt_strip->bytes_per_pixel = bytes_per_pixel;
rmt_strip->strip_len = led_config->max_leds;
rmt_strip->base.set_pixel = led_strip_rmt_set_pixel;
rmt_strip->base.set_pixel_rgbw = led_strip_rmt_set_pixel_rgbw;
rmt_strip->base.refresh = led_strip_rmt_refresh;
rmt_strip->base.clear = led_strip_rmt_clear;
rmt_strip->base.del = led_strip_rmt_del;
*ret_strip = &rmt_strip->base;
return ESP_OK;
err:
if (rmt_strip) {
if (rmt_strip->rmt_chan) {
rmt_del_channel(rmt_strip->rmt_chan);
}
if (rmt_strip->strip_encoder) {
rmt_del_encoder(rmt_strip->strip_encoder);
}
free(rmt_strip);
}
return ret;
}

View File

@@ -0,0 +1,194 @@
/*
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "sdkconfig.h"
#include "esp_idf_version.h"
#include "esp_check.h"
#include "esp_attr.h"
#include "led_strip_rmt_encoder.h"
static const char *TAG = "led_rmt_encoder";
#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 5, 0)
#if CONFIG_RMT_ISR_IRAM_SAFE
#define RMT_ENCODER_FUNC_ATTR IRAM_ATTR
#else
#define RMT_ENCODER_FUNC_ATTR
#endif // CONFIG_RMT_ISR_IRAM_SAFE
#endif // ESP_IDF_VERSION
typedef struct {
rmt_encoder_t base;
rmt_encoder_t *bytes_encoder;
rmt_encoder_t *copy_encoder;
int state;
rmt_symbol_word_t reset_code;
} rmt_led_strip_encoder_t;
RMT_ENCODER_FUNC_ATTR
static size_t rmt_encode_led_strip(rmt_encoder_t *encoder, rmt_channel_handle_t channel, const void *primary_data, size_t data_size, rmt_encode_state_t *ret_state)
{
rmt_led_strip_encoder_t *led_encoder = __containerof(encoder, rmt_led_strip_encoder_t, base);
rmt_encoder_handle_t bytes_encoder = led_encoder->bytes_encoder;
rmt_encoder_handle_t copy_encoder = led_encoder->copy_encoder;
rmt_encode_state_t session_state = 0;
rmt_encode_state_t state = 0;
size_t encoded_symbols = 0;
switch (led_encoder->state) {
case 0: // send RGB data
encoded_symbols += bytes_encoder->encode(bytes_encoder, channel, primary_data, data_size, &session_state);
if (session_state & RMT_ENCODING_COMPLETE) {
led_encoder->state = 1; // switch to next state when current encoding session finished
}
if (session_state & RMT_ENCODING_MEM_FULL) {
state |= RMT_ENCODING_MEM_FULL;
goto out; // yield if there's no free space for encoding artifacts
}
// fall-through
case 1: // send reset code
encoded_symbols += copy_encoder->encode(copy_encoder, channel, &led_encoder->reset_code,
sizeof(led_encoder->reset_code), &session_state);
if (session_state & RMT_ENCODING_COMPLETE) {
led_encoder->state = 0; // back to the initial encoding session
state |= RMT_ENCODING_COMPLETE;
}
if (session_state & RMT_ENCODING_MEM_FULL) {
state |= RMT_ENCODING_MEM_FULL;
goto out; // yield if there's no free space for encoding artifacts
}
}
out:
*ret_state = state;
return encoded_symbols;
}
static esp_err_t rmt_del_led_strip_encoder(rmt_encoder_t *encoder)
{
rmt_led_strip_encoder_t *led_encoder = __containerof(encoder, rmt_led_strip_encoder_t, base);
rmt_del_encoder(led_encoder->bytes_encoder);
rmt_del_encoder(led_encoder->copy_encoder);
free(led_encoder);
return ESP_OK;
}
RMT_ENCODER_FUNC_ATTR
static esp_err_t rmt_led_strip_encoder_reset(rmt_encoder_t *encoder)
{
rmt_led_strip_encoder_t *led_encoder = __containerof(encoder, rmt_led_strip_encoder_t, base);
rmt_encoder_reset(led_encoder->bytes_encoder);
rmt_encoder_reset(led_encoder->copy_encoder);
led_encoder->state = 0;
return ESP_OK;
}
esp_err_t rmt_new_led_strip_encoder(const led_strip_encoder_config_t *config, rmt_encoder_handle_t *ret_encoder)
{
esp_err_t ret = ESP_OK;
rmt_led_strip_encoder_t *led_encoder = NULL;
ESP_GOTO_ON_FALSE(config && ret_encoder, ESP_ERR_INVALID_ARG, err, TAG, "invalid argument");
ESP_GOTO_ON_FALSE(config->led_model < LED_MODEL_INVALID, ESP_ERR_INVALID_ARG, err, TAG, "invalid led model");
led_encoder = calloc(1, sizeof(rmt_led_strip_encoder_t));
ESP_GOTO_ON_FALSE(led_encoder, ESP_ERR_NO_MEM, err, TAG, "no mem for led strip encoder");
led_encoder->base.encode = rmt_encode_led_strip;
led_encoder->base.del = rmt_del_led_strip_encoder;
led_encoder->base.reset = rmt_led_strip_encoder_reset;
rmt_bytes_encoder_config_t bytes_encoder_config;
uint32_t reset_ticks = config->resolution / 1000000 * 280 / 2; // reset code duration defaults to 280us to accommodate WS2812B-V5
if (config->led_model == LED_MODEL_SK6812) {
bytes_encoder_config = (rmt_bytes_encoder_config_t) {
.bit0 = {
.level0 = 1,
.duration0 = 0.3 * config->resolution / 1000000, // T0H=0.3us
.level1 = 0,
.duration1 = 0.9 * config->resolution / 1000000, // T0L=0.9us
},
.bit1 = {
.level0 = 1,
.duration0 = 0.6 * config->resolution / 1000000, // T1H=0.6us
.level1 = 0,
.duration1 = 0.6 * config->resolution / 1000000, // T1L=0.6us
},
.flags.msb_first = 1 // SK6812 transfer bit order: G7...G0R7...R0B7...B0(W7...W0)
};
} else if (config->led_model == LED_MODEL_WS2812) {
// different led strip might have its own timing requirements, following parameter is for WS2812
bytes_encoder_config = (rmt_bytes_encoder_config_t) {
.bit0 = {
.level0 = 1,
.duration0 = 0.3 * config->resolution / 1000000, // T0H=0.3us
.level1 = 0,
.duration1 = 0.9 * config->resolution / 1000000, // T0L=0.9us
},
.bit1 = {
.level0 = 1,
.duration0 = 0.9 * config->resolution / 1000000, // T1H=0.9us
.level1 = 0,
.duration1 = 0.3 * config->resolution / 1000000, // T1L=0.3us
},
.flags.msb_first = 1 // WS2812 transfer bit order: G7...G0R7...R0B7...B0
};
} else if (config->led_model == LED_MODEL_WS2811) {
// different led strip might have its own timing requirements, following parameter is for WS2811
bytes_encoder_config = (rmt_bytes_encoder_config_t) {
.bit0 = {
.level0 = 1,
.duration0 = 0.5 * config->resolution / 1000000., // T0H=0.5us
.level1 = 0,
.duration1 = 2.0 * config->resolution / 1000000., // T0L=2.0us
},
.bit1 = {
.level0 = 1,
.duration0 = 1.2 * config->resolution / 1000000., // T1H=1.2us
.level1 = 0,
.duration1 = 1.3 * config->resolution / 1000000., // T1L=1.3us
},
.flags.msb_first = 1
};
reset_ticks = config->resolution / 1000000 * 50 / 2; // divide by 2... signal is sent twice
} else if (config->led_model == LED_MODEL_WS2816) {
// different led strip might have its own timing requirements, following parameter is for WS2816
bytes_encoder_config = (rmt_bytes_encoder_config_t) {
.bit0 = {
.level0 = 1,
.duration0 = 0.3 * config->resolution / 1000000, // T0H=0.3us
.level1 = 0,
.duration1 = 0.95 * config->resolution / 1000000, // T0L=0.95us
},
.bit1 = {
.level0 = 1,
.duration0 = 0.75 * config->resolution / 1000000, // T1H=0.75us
.level1 = 0,
.duration1 = 0.5 * config->resolution / 1000000, // T1L=0.5us
},
.flags.msb_first = 1
};
} else {
assert(false);
}
ESP_GOTO_ON_ERROR(rmt_new_bytes_encoder(&bytes_encoder_config, &led_encoder->bytes_encoder), err, TAG, "create bytes encoder failed");
rmt_copy_encoder_config_t copy_encoder_config = {};
ESP_GOTO_ON_ERROR(rmt_new_copy_encoder(&copy_encoder_config, &led_encoder->copy_encoder), err, TAG, "create copy encoder failed");
led_encoder->reset_code = (rmt_symbol_word_t) {
.level0 = 0,
.duration0 = reset_ticks,
.level1 = 0,
.duration1 = reset_ticks,
};
*ret_encoder = &led_encoder->base;
return ESP_OK;
err:
if (led_encoder) {
if (led_encoder->bytes_encoder) {
rmt_del_encoder(led_encoder->bytes_encoder);
}
if (led_encoder->copy_encoder) {
rmt_del_encoder(led_encoder->copy_encoder);
}
free(led_encoder);
}
return ret;
}

View File

@@ -0,0 +1,38 @@
/*
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include <stdint.h>
#include "driver/rmt_encoder.h"
#include "led_strip_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Type of led strip encoder configuration
*/
typedef struct {
uint32_t resolution; /*!< Encoder resolution, in Hz */
led_model_t led_model; /*!< LED model */
} led_strip_encoder_config_t;
/**
* @brief Create RMT encoder for encoding LED strip pixels into RMT symbols
*
* @param[in] config Encoder configuration
* @param[out] ret_encoder Returned encoder handle
* @return
* - ESP_ERR_INVALID_ARG for any invalid arguments
* - ESP_ERR_NO_MEM out of memory when creating led strip encoder
* - ESP_OK if creating encoder successfully
*/
esp_err_t rmt_new_led_strip_encoder(const led_strip_encoder_config_t *config, rmt_encoder_handle_t *ret_encoder);
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,248 @@
/*
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdlib.h>
#include <string.h>
#include <sys/cdefs.h>
#include "esp_log.h"
#include "esp_check.h"
#include "esp_rom_gpio.h"
#include "soc/spi_periph.h"
#include "led_strip.h"
#include "led_strip_interface.h"
#include "esp_heap_caps.h"
#define LED_STRIP_SPI_DEFAULT_RESOLUTION (2.5 * 1000 * 1000) // 2.5MHz resolution
#define LED_STRIP_SPI_DEFAULT_TRANS_QUEUE_SIZE 4
#define SPI_BYTES_PER_COLOR_BYTE 3
#define SPI_BITS_PER_COLOR_BYTE (SPI_BYTES_PER_COLOR_BYTE * 8)
static const char *TAG = "led_strip_spi";
typedef struct {
led_strip_t base;
spi_host_device_t spi_host;
spi_device_handle_t spi_device;
uint32_t strip_len;
uint8_t bytes_per_pixel;
led_color_component_format_t component_fmt;
uint8_t pixel_buf[];
} led_strip_spi_obj;
// please make sure to zero-initialize the buf before calling this function
static void __led_strip_spi_bit(uint8_t data, uint8_t *buf)
{
// Each color of 1 bit is represented by 3 bits of SPI, low_level:100 ,high_level:110
// So a color byte occupies 3 bytes of SPI.
*(buf + 2) |= data & BIT(0) ? BIT(2) | BIT(1) : BIT(2);
*(buf + 2) |= data & BIT(1) ? BIT(5) | BIT(4) : BIT(5);
*(buf + 2) |= data & BIT(2) ? BIT(7) : 0x00;
*(buf + 1) |= BIT(0);
*(buf + 1) |= data & BIT(3) ? BIT(3) | BIT(2) : BIT(3);
*(buf + 1) |= data & BIT(4) ? BIT(6) | BIT(5) : BIT(6);
*(buf + 0) |= data & BIT(5) ? BIT(1) | BIT(0) : BIT(1);
*(buf + 0) |= data & BIT(6) ? BIT(4) | BIT(3) : BIT(4);
*(buf + 0) |= data & BIT(7) ? BIT(7) | BIT(6) : BIT(7);
}
static esp_err_t led_strip_spi_set_pixel(led_strip_t *strip, uint32_t index, uint32_t red, uint32_t green, uint32_t blue)
{
led_strip_spi_obj *spi_strip = __containerof(strip, led_strip_spi_obj, base);
ESP_RETURN_ON_FALSE(index < spi_strip->strip_len, ESP_ERR_INVALID_ARG, TAG, "index out of maximum number of LEDs");
// 3 pixels take 72bits(9bytes)
uint32_t start = index * spi_strip->bytes_per_pixel * SPI_BYTES_PER_COLOR_BYTE;
uint8_t *pixel_buf = spi_strip->pixel_buf;
struct format_layout format = spi_strip->component_fmt.format;
memset(pixel_buf + start, 0, spi_strip->bytes_per_pixel * SPI_BYTES_PER_COLOR_BYTE);
uint8_t pos_bytes = format.bytes_per_color;
for (uint8_t i = 0; i < format.bytes_per_color; i++) {
uint8_t color_shift = 8 * (format.bytes_per_color - 1 - i);
__led_strip_spi_bit((red >> color_shift) & 0xFF, &pixel_buf[start + SPI_BYTES_PER_COLOR_BYTE * (format.r_pos * pos_bytes + i)]);
__led_strip_spi_bit((green >> color_shift) & 0xFF, &pixel_buf[start + SPI_BYTES_PER_COLOR_BYTE * (format.g_pos * pos_bytes + i)]);
__led_strip_spi_bit((blue >> color_shift) & 0xFF, &pixel_buf[start + SPI_BYTES_PER_COLOR_BYTE * (format.b_pos * pos_bytes + i)]);
if (format.num_components > 3) {
__led_strip_spi_bit(0, &pixel_buf[start + SPI_BYTES_PER_COLOR_BYTE * (format.w_pos * pos_bytes + i)]);
}
}
return ESP_OK;
}
static esp_err_t led_strip_spi_set_pixel_rgbw(led_strip_t *strip, uint32_t index, uint32_t red, uint32_t green, uint32_t blue, uint32_t white)
{
led_strip_spi_obj *spi_strip = __containerof(strip, led_strip_spi_obj, base);
struct format_layout format = spi_strip->component_fmt.format;
ESP_RETURN_ON_FALSE(index < spi_strip->strip_len, ESP_ERR_INVALID_ARG, TAG, "index out of maximum number of LEDs");
ESP_RETURN_ON_FALSE(format.num_components == 4, ESP_ERR_INVALID_ARG, TAG, "led doesn't have 4 components");
// LED_PIXEL_FORMAT_GRBW takes 96bits(12bytes)
uint32_t start = index * spi_strip->bytes_per_pixel * SPI_BYTES_PER_COLOR_BYTE;
uint8_t *pixel_buf = spi_strip->pixel_buf;
memset(pixel_buf + start, 0, spi_strip->bytes_per_pixel * SPI_BYTES_PER_COLOR_BYTE);
uint8_t pos_bytes = format.bytes_per_color;
for (uint8_t i = 0; i < format.bytes_per_color; i++) {
uint8_t color_shift = 8 * (format.bytes_per_color - 1 - i);
__led_strip_spi_bit((red >> color_shift) & 0xFF, &pixel_buf[start + SPI_BYTES_PER_COLOR_BYTE * (format.r_pos * pos_bytes + i)]);
__led_strip_spi_bit((green >> color_shift) & 0xFF, &pixel_buf[start + SPI_BYTES_PER_COLOR_BYTE * (format.g_pos * pos_bytes + i)]);
__led_strip_spi_bit((blue >> color_shift) & 0xFF, &pixel_buf[start + SPI_BYTES_PER_COLOR_BYTE * (format.b_pos * pos_bytes + i)]);
__led_strip_spi_bit((white >> color_shift) & 0xFF, &pixel_buf[start + SPI_BYTES_PER_COLOR_BYTE * (format.w_pos * pos_bytes + i)]);
}
return ESP_OK;
}
static esp_err_t led_strip_spi_refresh(led_strip_t *strip)
{
led_strip_spi_obj *spi_strip = __containerof(strip, led_strip_spi_obj, base);
spi_transaction_t tx_conf;
memset(&tx_conf, 0, sizeof(tx_conf));
tx_conf.length = spi_strip->strip_len * spi_strip->bytes_per_pixel * SPI_BITS_PER_COLOR_BYTE;
tx_conf.tx_buffer = spi_strip->pixel_buf;
tx_conf.rx_buffer = NULL;
ESP_RETURN_ON_ERROR(spi_device_transmit(spi_strip->spi_device, &tx_conf), TAG, "transmit pixels by SPI failed");
return ESP_OK;
}
static esp_err_t led_strip_spi_clear(led_strip_t *strip)
{
led_strip_spi_obj *spi_strip = __containerof(strip, led_strip_spi_obj, base);
//Write zero to turn off all leds
memset(spi_strip->pixel_buf, 0, spi_strip->strip_len * spi_strip->bytes_per_pixel * SPI_BYTES_PER_COLOR_BYTE);
uint8_t *buf = spi_strip->pixel_buf;
for (int index = 0; index < spi_strip->strip_len * spi_strip->bytes_per_pixel; index++) {
__led_strip_spi_bit(0, buf);
buf += SPI_BYTES_PER_COLOR_BYTE;
}
return led_strip_spi_refresh(strip);
}
static esp_err_t led_strip_spi_del(led_strip_t *strip)
{
led_strip_spi_obj *spi_strip = __containerof(strip, led_strip_spi_obj, base);
ESP_RETURN_ON_ERROR(spi_bus_remove_device(spi_strip->spi_device), TAG, "delete spi device failed");
ESP_RETURN_ON_ERROR(spi_bus_free(spi_strip->spi_host), TAG, "free spi bus failed");
free(spi_strip);
return ESP_OK;
}
esp_err_t led_strip_new_spi_device(const led_strip_config_t *led_config, const led_strip_spi_config_t *spi_config, led_strip_handle_t *ret_strip)
{
led_strip_spi_obj *spi_strip = NULL;
esp_err_t ret = ESP_OK;
ESP_GOTO_ON_FALSE(led_config && spi_config && ret_strip, ESP_ERR_INVALID_ARG, err, TAG, "invalid argument");
led_color_component_format_t component_fmt = led_config->color_component_format;
// If R/G/B order is not specified, set default GRB order as fallback
if (component_fmt.format_id == 0) {
component_fmt = LED_STRIP_COLOR_COMPONENT_FMT_GRB;
}
if (led_config->led_model == LED_MODEL_WS2816) {
component_fmt.format.bytes_per_color = 2;
}
if (component_fmt.format.bytes_per_color == 0) {
component_fmt.format.bytes_per_color = 1;
}
uint8_t mask = 0;
if (component_fmt.format.num_components == 3) {
mask = BIT(component_fmt.format.r_pos) | BIT(component_fmt.format.g_pos) | BIT(component_fmt.format.b_pos);
// Check for invalid values
ESP_RETURN_ON_FALSE(mask == 0x07, ESP_ERR_INVALID_ARG, TAG, "invalid order argument");
} else if (component_fmt.format.num_components == 4) {
mask = BIT(component_fmt.format.r_pos) | BIT(component_fmt.format.g_pos) | BIT(component_fmt.format.b_pos) | BIT(component_fmt.format.w_pos);
// Check for invalid values
ESP_RETURN_ON_FALSE(mask == 0x0F, ESP_ERR_INVALID_ARG, TAG, "invalid order argument");
} else {
ESP_RETURN_ON_FALSE(false, ESP_ERR_INVALID_ARG, TAG, "invalid number of color components: %d", component_fmt.format.num_components);
}
uint8_t bytes_per_pixel = component_fmt.format.num_components;
if (component_fmt.format.bytes_per_color > 1) {
bytes_per_pixel *= component_fmt.format.bytes_per_color;
}
uint32_t mem_caps = MALLOC_CAP_DEFAULT;
if (spi_config->flags.with_dma) {
// DMA buffer must be placed in internal SRAM
mem_caps |= MALLOC_CAP_INTERNAL | MALLOC_CAP_DMA;
}
spi_strip = heap_caps_calloc(1, sizeof(led_strip_spi_obj) + led_config->max_leds * bytes_per_pixel * SPI_BYTES_PER_COLOR_BYTE, mem_caps);
ESP_GOTO_ON_FALSE(spi_strip, ESP_ERR_NO_MEM, err, TAG, "no mem for spi strip");
spi_strip->spi_host = spi_config->spi_bus;
// for backward compatibility, if the user does not set the clk_src, use the default value
spi_clock_source_t clk_src = SPI_CLK_SRC_DEFAULT;
if (spi_config->clk_src) {
clk_src = spi_config->clk_src;
}
spi_bus_config_t spi_bus_cfg = {
.mosi_io_num = led_config->strip_gpio_num,
//Only use MOSI to generate the signal, set -1 when other pins are not used.
.miso_io_num = -1,
.sclk_io_num = -1,
.quadwp_io_num = -1,
.quadhd_io_num = -1,
.max_transfer_sz = led_config->max_leds * bytes_per_pixel * SPI_BYTES_PER_COLOR_BYTE,
};
ESP_GOTO_ON_ERROR(spi_bus_initialize(spi_strip->spi_host, &spi_bus_cfg, spi_config->flags.with_dma ? SPI_DMA_CH_AUTO : SPI_DMA_DISABLED), err, TAG, "create SPI bus failed");
if (led_config->flags.invert_out == true) {
esp_rom_gpio_connect_out_signal(led_config->strip_gpio_num, spi_periph_signal[spi_strip->spi_host].spid_out, true, false);
}
spi_device_interface_config_t spi_dev_cfg = {
.clock_source = clk_src,
.command_bits = 0,
.address_bits = 0,
.dummy_bits = 0,
.clock_speed_hz = LED_STRIP_SPI_DEFAULT_RESOLUTION,
.mode = 0,
//set -1 when CS is not used
.spics_io_num = -1,
.queue_size = LED_STRIP_SPI_DEFAULT_TRANS_QUEUE_SIZE,
};
ESP_GOTO_ON_ERROR(spi_bus_add_device(spi_strip->spi_host, &spi_dev_cfg, &spi_strip->spi_device), err, TAG, "Failed to add spi device");
//ensure the reset time is enough
esp_rom_delay_us(10);
int clock_resolution_khz = 0;
spi_device_get_actual_freq(spi_strip->spi_device, &clock_resolution_khz);
// TODO: ideally we should decide the SPI_BYTES_PER_COLOR_BYTE by the real clock resolution
// But now, let's fixed the resolution, the downside is, we don't support a clock source whose frequency is not multiple of LED_STRIP_SPI_DEFAULT_RESOLUTION
// clock_resolution between 2.2MHz to 2.8MHz is supported
ESP_GOTO_ON_FALSE((clock_resolution_khz < LED_STRIP_SPI_DEFAULT_RESOLUTION / 1000 + 300) && (clock_resolution_khz > LED_STRIP_SPI_DEFAULT_RESOLUTION / 1000 - 300), ESP_ERR_NOT_SUPPORTED, err,
TAG, "unsupported clock resolution:%dKHz", clock_resolution_khz);
if (led_config->led_model != LED_MODEL_WS2812) {
ESP_LOGW(TAG, "Only support WS2812. The timing requirements for other models may not be met");
}
spi_strip->component_fmt = component_fmt;
spi_strip->bytes_per_pixel = bytes_per_pixel;
spi_strip->strip_len = led_config->max_leds;
spi_strip->base.set_pixel = led_strip_spi_set_pixel;
spi_strip->base.set_pixel_rgbw = led_strip_spi_set_pixel_rgbw;
spi_strip->base.refresh = led_strip_spi_refresh;
spi_strip->base.clear = led_strip_spi_clear;
spi_strip->base.del = led_strip_spi_del;
*ret_strip = &spi_strip->base;
return ESP_OK;
err:
if (spi_strip) {
if (spi_strip->spi_device) {
spi_bus_remove_device(spi_strip->spi_device);
}
if (spi_strip->spi_host) {
spi_bus_free(spi_strip->spi_host);
}
free(spi_strip);
}
return ret;
}

View File

@@ -0,0 +1,17 @@
# SPDX-FileCopyrightText: 2022-2026 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0
import logging
import os
import pytest
from pytest_embedded_idf.dut import IdfDut
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.generic
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_blink(dut: IdfDut) -> None:
# check and log bin size
binary_file = os.path.join(dut.app.binary_path, 'blink.bin')
bin_size = os.path.getsize(binary_file)
logging.info(f'blink_bin_size : {bin_size // 1024}KB')

2480
software/blink/sdkconfig Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
CONFIG_BLINK_LED_GPIO=y
CONFIG_BLINK_GPIO=8

View File

@@ -0,0 +1 @@
CONFIG_BLINK_GPIO=5

View File

@@ -0,0 +1,7 @@
CONFIG_BLINK_LED_STRIP=y
#
# Please Note:
# ESP32-S3-DevKitC v1.1 uses GPIO38 for the on-board LED
# ESP32-S3-DevKitC v1.0 uses GPIO48 for the on-board LED
#
CONFIG_BLINK_GPIO=38

View File

@@ -0,0 +1,8 @@
# The following lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.22)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
idf_build_set_property(MINIMAL_BUILD ON)
project(hello_world)

View File

@@ -0,0 +1,53 @@
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-H2 | ESP32-H21 | ESP32-H4 | ESP32-P4 | ESP32-S2 | ESP32-S3 | ESP32-S31 | Linux |
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | --------- | -------- | -------- | -------- | -------- | --------- | ----- |
# Hello World Example
Starts a FreeRTOS task to print "Hello World".
(See the README.md file in the upper level 'examples' directory for more information about examples.)
## How to use example
Follow detailed instructions provided specifically for this example.
Select the instructions depending on Espressif chip installed on your development board:
- [ESP32 Getting Started Guide](https://docs.espressif.com/projects/esp-idf/en/stable/get-started/index.html)
- [ESP32-S2 Getting Started Guide](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/get-started/index.html)
## Example folder contents
The project **hello_world** contains one source file in C language [hello_world_main.c](main/hello_world_main.c). The file is located in folder [main](main).
ESP-IDF projects are built using CMake. The project build configuration is contained in `CMakeLists.txt` files that provide set of directives and instructions describing the project's source files and targets (executable, library, or both).
Below is short explanation of remaining files in the project folder.
```
├── CMakeLists.txt
├── pytest_hello_world.py Python script used for automated testing
├── main
│ ├── CMakeLists.txt
│ └── hello_world_main.c
└── README.md This is the file you are currently reading
```
For more information on structure and contents of ESP-IDF projects, please refer to Section [Build System](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/build-system.html) of the ESP-IDF Programming Guide.
## Troubleshooting
* Program upload failure
* Hardware connection is not correct: run `idf.py -p PORT monitor`, and reboot your board to see if there are any output logs.
* The baud rate for downloading is too high: lower your baud rate in the `menuconfig` menu, and try again.
## Technical support and feedback
Please use the following feedback channels:
* For technical queries, go to the [esp32.com](https://esp32.com/) forum
* For a feature request or bug report, create a [GitHub issue](https://github.com/espressif/esp-idf/issues)
We will get back to you as soon as possible.

View File

@@ -0,0 +1,3 @@
idf_component_register(SRCS "hello_world_main.c"
PRIV_REQUIRES spi_flash
INCLUDE_DIRS "")

View File

@@ -0,0 +1,52 @@
#include <stdint.h>
#include <stdio.h>
#include <inttypes.h>
#include "sdkconfig.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_chip_info.h"
#include "esp_flash.h"
#include "esp_system.h"
void app_main(void)
{
printf("Hello world!\n");
/* Print chip information */
esp_chip_info_t chip_info;
uint32_t flash_size;
esp_chip_info(&chip_info);
printf("This is %s chip with %d CPU core(s), %s%s%s%s, ",
CONFIG_IDF_TARGET,
chip_info.cores,
(chip_info.features & CHIP_FEATURE_WIFI_BGN) ? "WiFi/" : "",
(chip_info.features & CHIP_FEATURE_BT) ? "BT" : "",
(chip_info.features & CHIP_FEATURE_BLE) ? "BLE" : "",
(chip_info.features & CHIP_FEATURE_IEEE802154) ? ", 802.15.4 (Zigbee/Thread)" : "");
unsigned major_rev = chip_info.revision / 100;
unsigned minor_rev = chip_info.revision % 100;
printf("silicon revision v%d.%d, ", major_rev, minor_rev);
if(esp_flash_get_size(NULL, &flash_size) != ESP_OK) {
printf("Get flash size failed");
return;
}
printf("%" PRIu32 "MB %s flash\n", flash_size / (uint32_t)(1024 * 1024),
(chip_info.features & CHIP_FEATURE_EMB_FLASH) ? "embedded" : "external");
printf("Minimum free heap size: %" PRIu32 " bytes\n", esp_get_minimum_free_heap_size());
for (int i = 10; i >= 0; i--) {
printf("Restarting in %d seconds...\n", i);
vTaskDelay(1000 / portTICK_PERIOD_MS);
}
printf("Restarting now.\n");
fflush(stdout);
esp_restart();
}

View File

@@ -0,0 +1,2 @@
dependencies:
espressif/led_strip: "^3.0.0"

View File

@@ -0,0 +1,54 @@
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0
import hashlib
import logging
from collections.abc import Callable
import pytest
from pytest_embedded_idf.dut import IdfDut
from pytest_embedded_idf.utils import idf_parametrize
from pytest_embedded_qemu.app import QemuApp
from pytest_embedded_qemu.dut import QemuDut
@pytest.mark.generic
@idf_parametrize('target', ['supported_targets', 'preview_targets'], indirect=['target'])
def test_hello_world(dut: IdfDut, log_minimum_free_heap_size: Callable[..., None]) -> None:
dut.expect('Hello world!')
log_minimum_free_heap_size()
@pytest.mark.host_test
@idf_parametrize('target', ['linux'], indirect=['target'])
def test_hello_world_linux(dut: IdfDut) -> None:
dut.expect('Hello world!')
@pytest.mark.host_test
@pytest.mark.macos
@idf_parametrize('target', ['linux'], indirect=['target'])
def test_hello_world_macos(dut: IdfDut) -> None:
dut.expect('Hello world!')
def verify_elf_sha256_embedding(app: QemuApp, sha256_reported: str) -> None:
sha256 = hashlib.sha256()
with open(app.elf_file, 'rb') as f:
sha256.update(f.read())
sha256_expected = sha256.hexdigest()
logging.info(f'ELF file SHA256: {sha256_expected}')
logging.info(f'ELF file SHA256 (reported by the app): {sha256_reported}')
# the app reports only the first several hex characters of the SHA256, check that they match
if not sha256_expected.startswith(sha256_reported):
raise ValueError('ELF file SHA256 mismatch')
@pytest.mark.qemu
@idf_parametrize('target', ['esp32', 'esp32c3'], indirect=['target'])
def test_hello_world_host(app: QemuApp, dut: QemuDut) -> None:
sha256_reported = dut.expect(r'ELF file SHA256:\s+([a-f0-9]+)').group(1).decode('utf-8')
verify_elf_sha256_embedding(app, sha256_reported)
dut.expect('Hello world!')

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More