Compare commits

80 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
d02ffe4417 auto commited 2026-04-14 21:37:00 +12:00
d26e6da5d7 auto commited 2026-04-14 21:37:00 +12:00
f702e172eb auto commited 2026-04-14 21:37:00 +12:00
fa81d795fd auto commited 2026-04-14 21:37:00 +12:00
dce0a036fb logo type shit 2026-04-14 21:25:19 +12:00
b6c42c3a07 WIP 2026-04-14 21:25:01 +12:00
sirlilpanda
0446a2f61d auto commited 2026-04-01 15:23:56 +13:00
sirlilpanda
489a6343ec auto commited 2026-04-01 15:23:56 +13:00
sirlilpanda
29ff2562b2 auto commited 2026-04-01 15:23:56 +13:00
sirlilpanda
adee10b3f1 auto commited 2026-04-01 15:23:56 +13:00
sirlilpanda
96a948366e connected mcu 2026-04-01 15:23:26 +13:00
sirlilpanda
9e84efd619 bump to 10 2026-04-01 11:48:45 +13:00
sirlilpanda
ac42fbf61b now ignores the history dir 2026-04-01 11:48:34 +13:00
ea2768b5ae auto commited 2026-03-31 21:17:21 +13:00
eb3dcea847 auto commited 2026-03-31 21:17:21 +13:00
eff7f71f15 auto commited 2026-03-31 21:17:21 +13:00
b9deb29864 auto commited 2026-03-31 21:17:21 +13:00
7413c878c7 almost there 2026-03-31 21:17:05 +13:00
sirlilpanda
c237595260 auto commited 2026-03-31 17:31:08 +13:00
sirlilpanda
4b6e760a23 auto commited 2026-03-31 17:31:08 +13:00
sirlilpanda
9ba7d8b533 auto commited 2026-03-31 17:31:08 +13:00
sirlilpanda
6f837e22ee auto commited 2026-03-31 17:31:08 +13:00
sirlilpanda
515496bb89 wip 2026-03-31 17:30:29 +13:00
sirlilpanda
fba53de48b auto commited 2026-03-31 15:48:17 +13:00
sirlilpanda
0d64a3b25f auto commited 2026-03-31 15:48:17 +13:00
sirlilpanda
3bf71d11ae auto commited 2026-03-31 15:48:17 +13:00
sirlilpanda
4d4a638cc7 auto commited 2026-03-31 15:48:17 +13:00
sirlilpanda
4edd8622b5 WIP 2026-03-31 15:47:35 +13:00
sirlilpanda
519c5c9248 auto commited 2026-03-25 17:56:38 +13:00
sirlilpanda
11bf2ddeb3 auto commited 2026-03-25 17:56:38 +13:00
sirlilpanda
bf8942d461 auto commited 2026-03-25 17:56:38 +13:00
sirlilpanda
8a47b6deda auto commited 2026-03-25 17:56:38 +13:00
sirlilpanda
636e15787a WIP 2026-03-25 17:55:59 +13:00
sirlilpanda
991391b6ab auto commited 2026-03-23 15:50:27 +13:00
sirlilpanda
e822f49def auto commited 2026-03-23 15:50:27 +13:00
sirlilpanda
0ba9ec4434 auto commited 2026-03-23 15:50:27 +13:00
sirlilpanda
582d6d3889 auto commited 2026-03-23 15:50:27 +13:00
sirlilpanda
8b984b4644 WIP 2026-03-23 15:50:13 +13:00
sirlilpanda
0531496428 routed motor drivers 2026-03-23 11:31:20 +13:00
a6a07db374 auto commited 2026-03-22 23:52:57 +13:00
4b0394e2d0 auto commited 2026-03-22 23:52:57 +13:00
6a6eaeabeb auto commited 2026-03-22 23:52:57 +13:00
2190cc3f57 auto commited 2026-03-22 23:52:57 +13:00
1ff7554148 WIP 2026-03-22 23:52:43 +13:00
sirlilpanda
ce00c2244b WIP 2026-03-11 21:28:51 +13:00
sirlilpanda
ec80fdc778 WIP 2026-03-11 17:45:10 +13:00
sirlilpanda
c6b0950033 updated annotating 2026-03-11 17:44:54 +13:00
sirlilpanda
46951a2cf2 added design rules area around power switches to keep them consistant 2026-03-11 17:44:16 +13:00
sirlilpanda
ea9211fe86 added rules area for routing ic and mosfets differnetly 2026-03-11 17:42:22 +13:00
e00d507fa4 auto commited 2026-03-10 23:50:55 +13:00
86461780b1 auto commited 2026-03-10 23:50:55 +13:00
d233a6aad8 auto commited 2026-03-10 23:50:55 +13:00
420e6bfb85 auto commited 2026-03-10 23:50:55 +13:00
fb1bde5ff3 bump 2026-03-10 23:50:35 +13:00
43007d95b5 the start 2026-03-10 23:50:11 +13:00
127d069321 changed foot print for the fuse 2026-03-10 23:49:56 +13:00
d9b2448e36 added rule areas and directive labels to bucks to keep routing consisant 2026-03-10 23:48:56 +13:00
ce838d80d2 added foot prints for switches and buttons 2026-03-10 23:48:10 +13:00
239 changed files with 684361 additions and 10357 deletions

8
.gitignore vendored
View File

@@ -37,6 +37,12 @@ fp-info-cache
# Archived Backups (KiCad 6.0) # Archived Backups (KiCad 6.0)
**/*-backups/*.zip **/*-backups/*.zip
**/.history/
# 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/esp32-racer_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/`

File diff suppressed because it is too large Load Diff

View File

@@ -1,24 +1,10 @@
ERC report (2026-03-10T23:17:43+1300, Encoding UTF8) ERC report (2026-04-14T22:31:54, Encoding UTF8)
Report includes: Errors, Warnings
***** Sheet / ***** Sheet /
[hier_label_mismatch]: Sheet pin POWER_EN has no matching hierarchical label inside the sheet [hier_label_mismatch]: Sheet pin POWER_EN has no matching hierarchical label inside the sheet
; error ; error
@(57.15 mm, 49.53 mm): Hierarchical Sheet Pin POWER_EN @(57.15 mm, 49.53 mm): Hierarchical Sheet Pin 'POWER_EN'
[power_pin_not_driven]: Input Power pin not driven by any Output Power pins
; error
@(143.51 mm, 83.82 mm): Symbol #PWR01 Pin 1 [Power input, Line]
[power_pin_not_driven]: Input Power pin not driven by any Output Power pins
; error
@(143.51 mm, 124.46 mm): Symbol #PWR03 Pin 1 [Power input, Line]
[duplicate_pins]: Symbol 'LMR33630BDDA' has multiple pins with the same pin number
; error
@(82.55 mm, 31.75 mm): Symbol U4 [LMR33630BDDA]
[duplicate_pins]: Symbol 'LMR33630BDDA' has multiple pins with the same pin number
; error
@(191.77 mm, 82.55 mm): Symbol U7 [LMR33630BDDA]
[label_dangling]: Label not connected to anything
; error
@(120.65 mm, 95.25 mm): Label 'boot'
[no_connect_dangling]: Unconnected "no connection" flag [no_connect_dangling]: Unconnected "no connection" flag
; warning ; warning
@(57.15 mm, 53.34 mm): No Connect @(57.15 mm, 53.34 mm): No Connect
@@ -31,13 +17,19 @@ ERC report (2026-03-10T23:17:43+1300, Encoding UTF8)
[lib_symbol_mismatch]: Symbol 'TPS2116DRL' doesn't match copy in library 'Power_Management' [lib_symbol_mismatch]: Symbol 'TPS2116DRL' doesn't match copy in library 'Power_Management'
; warning ; warning
@(217.17 mm, 27.94 mm): Symbol U8 [TPS2116DRL] @(217.17 mm, 27.94 mm): Symbol U8 [TPS2116DRL]
[unconnected_wire_endpoint]: Unconnected wire endpoint
; warning
@(176.53 mm, 134.62 mm): Vertical Wire, length 11.43 mm
[unconnected_wire_endpoint]: Unconnected wire endpoint
; warning
@(191.77 mm, 134.62 mm): Vertical Wire, length 13.97 mm
[lib_symbol_mismatch]: Symbol 'Battery' doesn't match copy in library 'Device' [lib_symbol_mismatch]: Symbol 'Battery' doesn't match copy in library 'Device'
; warning ; warning
@(25.40 mm, 99.06 mm): Symbol BT1 [Battery] @(25.40 mm, 99.06 mm): Symbol BT1 [Battery]
[lib_symbol_issues]: The symbol library 'esp32-racer-lib' was not found at '/home/zekkos/Documents/ta/461/esp32-racer/hardware/esp32-racer-lib/esp32-racer-lib.kicad_sym'. [lib_symbol_issues]: The symbol library 'esp32-racer-lib' was not found at '/home/zekkos/Documents/ta/461/esp32-racer/hardware/esp32-racer-lib/esp32-racer-lib.kicad_sym'
; warning ; warning
@(73.66 mm, 109.22 mm): Symbol Q17 [DOZ50N03] @(73.66 mm, 109.22 mm): Symbol Q17 [DOZ50N03]
[lib_symbol_issues]: The symbol library 'esp32-racer-lib' was not found at '/home/zekkos/Documents/ta/461/esp32-racer/hardware/esp32-racer-lib/esp32-racer-lib.kicad_sym'. [lib_symbol_issues]: The symbol library 'esp32-racer-lib' was not found at '/home/zekkos/Documents/ta/461/esp32-racer/hardware/esp32-racer-lib/esp32-racer-lib.kicad_sym'
; warning ; warning
@(134.62 mm, 109.22 mm): Symbol Q18 [DOZ50N03] @(134.62 mm, 109.22 mm): Symbol Q18 [DOZ50N03]
[lib_symbol_mismatch]: Symbol 'USB_C_Receptacle_USB2.0_14P' doesn't match copy in library 'Connector' [lib_symbol_mismatch]: Symbol 'USB_C_Receptacle_USB2.0_14P' doesn't match copy in library 'Connector'
@@ -61,23 +53,26 @@ ERC report (2026-03-10T23:17:43+1300, Encoding UTF8)
[lib_symbol_mismatch]: Symbol 'ADC128D818' doesn't match copy in library 'Analog_ADC' [lib_symbol_mismatch]: Symbol 'ADC128D818' doesn't match copy in library 'Analog_ADC'
; warning ; warning
@(49.53 mm, 165.10 mm): Symbol U13 [ADC128D818] @(49.53 mm, 165.10 mm): Symbol U13 [ADC128D818]
[lib_symbol_issues]: The symbol library 'esp32-racer-lib' was not found at '/home/zekkos/Documents/ta/461/esp32-racer/hardware/esp32-racer-lib/esp32-racer-lib.kicad_sym'. [lib_symbol_issues]: The symbol library 'esp32-racer-lib' was not found at '/home/zekkos/Documents/ta/461/esp32-racer/hardware/esp32-racer-lib/esp32-racer-lib.kicad_sym'
; warning ; warning
@(129.54 mm, 91.44 mm): Symbol U12 [DRV8701E] @(129.54 mm, 91.44 mm): Symbol U12 [DRV8701E]
[lib_symbol_issues]: The symbol library 'esp32-racer-lib' was not found at '/home/zekkos/Documents/ta/461/esp32-racer/hardware/esp32-racer-lib/esp32-racer-lib.kicad_sym'. [lib_symbol_issues]: The symbol library 'esp32-racer-lib' was not found at '/home/zekkos/Documents/ta/461/esp32-racer/hardware/esp32-racer-lib/esp32-racer-lib.kicad_sym'
; warning ; warning
@(162.56 mm, 71.12 mm): Symbol Q13 [DOZ50N03] @(162.56 mm, 71.12 mm): Symbol Q13 [DOZ50N03]
[lib_symbol_issues]: The symbol library 'esp32-racer-lib' was not found at '/home/zekkos/Documents/ta/461/esp32-racer/hardware/esp32-racer-lib/esp32-racer-lib.kicad_sym'. [lib_symbol_issues]: The symbol library 'esp32-racer-lib' was not found at '/home/zekkos/Documents/ta/461/esp32-racer/hardware/esp32-racer-lib/esp32-racer-lib.kicad_sym'
; warning ; warning
@(162.56 mm, 81.28 mm): Symbol Q14 [DOZ50N03] @(162.56 mm, 81.28 mm): Symbol Q14 [DOZ50N03]
[lib_symbol_issues]: The symbol library 'esp32-racer-lib' was not found at '/home/zekkos/Documents/ta/461/esp32-racer/hardware/esp32-racer-lib/esp32-racer-lib.kicad_sym'. [lib_symbol_issues]: The symbol library 'esp32-racer-lib' was not found at '/home/zekkos/Documents/ta/461/esp32-racer/hardware/esp32-racer-lib/esp32-racer-lib.kicad_sym'
; warning ; warning
@(180.34 mm, 86.36 mm): Symbol Q15 [DOZ50N03] @(180.34 mm, 86.36 mm): Symbol Q15 [DOZ50N03]
[lib_symbol_issues]: The symbol library 'esp32-racer-lib' was not found at '/home/zekkos/Documents/ta/461/esp32-racer/hardware/esp32-racer-lib/esp32-racer-lib.kicad_sym'. [lib_symbol_issues]: The symbol library 'esp32-racer-lib' was not found at '/home/zekkos/Documents/ta/461/esp32-racer/hardware/esp32-racer-lib/esp32-racer-lib.kicad_sym'
; warning ; warning
@(180.34 mm, 96.52 mm): Symbol Q16 [DOZ50N03] @(180.34 mm, 96.52 mm): Symbol Q16 [DOZ50N03]
***** Sheet /MOTOR_DRIVER2/ ***** Sheet /MOTOR_DRIVER2/
[power_pin_not_driven]: Input Power pin not driven by any Output Power pins
; error
@(129.54 mm, 63.50 mm): Symbol U12 Pin 1 [VM, Power input, Line]
***** Sheet /MCU/ ***** Sheet /MCU/
[pin_not_connected]: Pin not connected [pin_not_connected]: Pin not connected
@@ -86,18 +81,18 @@ ERC report (2026-03-10T23:17:43+1300, Encoding UTF8)
[pin_not_connected]: Pin not connected [pin_not_connected]: Pin not connected
; error ; error
@(100.33 mm, 176.53 mm): Symbol U3 Pin 25 [IO48, Bidirectional, Line] @(100.33 mm, 176.53 mm): Symbol U3 Pin 25 [IO48, Bidirectional, Line]
[similar_labels]: Labels are similar (lower/upper case difference only)
; warning
@(120.65 mm, 95.25 mm): Label 'boot'
@(276.86 mm, 85.09 mm): Label 'BOOT'
***** Sheet /PWR/ ***** Sheet /PWR/
[power_pin_not_driven]: Input Power pin not driven by any Output Power pins [power_pin_not_driven]: Input Power pin not driven by any Output Power pins
; error ; error
@(20.32 mm, 22.86 mm): Symbol #PWR046 Pin 1 [Power input, Line] @(72.39 mm, 26.67 mm): Symbol U4 Pin 2 [VIN, Power input, Line]
[pin_not_connected]: Pin not connected [pin_not_connected]: Pin not connected
; error ; error
@(82.55 mm, 48.26 mm): Symbol U4 Hidden pin 9 [GND, Passive, Line] @(82.55 mm, 48.26 mm): Symbol U4 Hidden pin 9 [GND, Passive, Line]
[duplicate_pins]: Pin 9 on symbol 'U4' is connected to different nets: GND and Net-(U4-GND-Pad9)
; error
@(90.17 mm, 55.88 mm): Symbol U4 Pin 9 [EPAD, Passive, Line]
@(82.55 mm, 48.26 mm): Symbol U4 Hidden pin 9 [GND, Passive, Line]
[pin_to_pin]: Pins of type Output and Output are connected [pin_to_pin]: Pins of type Output and Output are connected
; error ; error
@(55.88 mm, 106.68 mm): Symbol U5 Pin 8 [PG, Output, Line] @(55.88 mm, 106.68 mm): Symbol U5 Pin 8 [PG, Output, Line]
@@ -140,16 +135,20 @@ ERC report (2026-03-10T23:17:43+1300, Encoding UTF8)
@(96.52 mm, 165.10 mm): Symbol U6 Pin 5 [VOUT, Output, Line] @(96.52 mm, 165.10 mm): Symbol U6 Pin 5 [VOUT, Output, Line]
[power_pin_not_driven]: Input Power pin not driven by any Output Power pins [power_pin_not_driven]: Input Power pin not driven by any Output Power pins
; error ; error
@(185.42 mm, 44.45 mm): Symbol #PWR093 Pin 1 [Power input, Line] @(207.01 mm, 22.86 mm): Symbol U8 Pin 3 [VIN1, Power input, Line]
[power_pin_not_driven]: Input Power pin not driven by any Output Power pins [power_pin_not_driven]: Input Power pin not driven by any Output Power pins
; error ; error
@(207.01 mm, 22.86 mm): Symbol U8 Pin 3 [VIN1, Power input, Line] @(207.01 mm, 45.72 mm): Symbol U8 Pin 6 [VIN2, Power input, Line]
[power_pin_not_driven]: Input Power pin not driven by any Output Power pins
; error
@(173.99 mm, 123.19 mm): Symbol #PWR089 Pin 1 [Power input, Line]
[duplicate_pins]: Pin 9 on symbol 'U7' is connected to different nets: Net-(U7-GND-Pad9) and GND
; error
@(191.77 mm, 99.06 mm): Symbol U7 Hidden pin 9 [GND, Passive, Line]
@(199.39 mm, 106.68 mm): Symbol U7 Pin 9 [EPAD, Passive, Line]
[pin_not_connected]: Pin not connected [pin_not_connected]: Pin not connected
; error ; error
@(191.77 mm, 99.06 mm): Symbol U7 Hidden pin 9 [GND, Passive, Line] @(191.77 mm, 99.06 mm): Symbol U7 Hidden pin 9 [GND, Passive, Line]
[power_pin_not_driven]: Input Power pin not driven by any Output Power pins
; error
@(191.77 mm, 129.54 mm): Symbol #PWR097 Pin 1 [Power input, Line]
[hier_label_mismatch]: Hierarchical label POWER_SUPPLIED has no matching sheet pin in the parent sheet [hier_label_mismatch]: Hierarchical label POWER_SUPPLIED has no matching sheet pin in the parent sheet
; error ; error
@(236.22 mm, 45.72 mm): Hierarchical Label 'POWER_SUPPLIED' @(236.22 mm, 45.72 mm): Hierarchical Label 'POWER_SUPPLIED'
@@ -171,7 +170,7 @@ ERC report (2026-03-10T23:17:43+1300, Encoding UTF8)
@(96.52 mm, 173.99 mm): Symbol R25 Pin 1 [Passive, Line] @(96.52 mm, 173.99 mm): Symbol R25 Pin 1 [Passive, Line]
[multiple_net_names]: Both +5V and 5v@2.5A are attached to the same items; +5V will be used in the netlist [multiple_net_names]: Both +5V and 5v@2.5A are attached to the same items; +5V will be used in the netlist
; warning ; warning
@(217.17 mm, 146.05 mm): Symbol #PWR0104 Pin 1 [Power input, Line] @(280.67 mm, 19.05 mm): Symbol #PWR0112 Pin 1 [Power input, Line]
@(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
@@ -179,12 +178,15 @@ ERC report (2026-03-10T23:17:43+1300, Encoding UTF8)
@(240.03 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
@(76.20 mm, 139.70 mm): Symbol #PWR062 Pin 1 [Power input, Line] @(276.86 mm, 146.05 mm): Symbol #PWR0110 Pin 1 [Power input, Line]
@(266.70 mm, 147.32 mm): Label '3.3v@1A' @(266.70 mm, 147.32 mm): Label '3.3v@1A'
***** Sheet /MOTOR_DRIVER1/ ***** Sheet /MOTOR_DRIVER1/
***** Sheet /MOTOR_DRIVER3/ ***** Sheet /MOTOR_DRIVER3/
[power_pin_not_driven]: Input Power pin not driven by any Output Power pins
; error
@(129.54 mm, 63.50 mm): Symbol U12 Pin 1 [VM, Power input, Line]
***** Sheet /MOTOR_DRIVER4/ ***** Sheet /MOTOR_DRIVER4/
@@ -214,4 +216,10 @@ ERC report (2026-03-10T23:17:43+1300, Encoding UTF8)
@(252.73 mm, 67.31 mm): Symbol #PWR0213 Pin 1 [Power input, Line] @(252.73 mm, 67.31 mm): Symbol #PWR0213 Pin 1 [Power input, Line]
@(231.14 mm, 69.85 mm): Label '5V@3A' @(231.14 mm, 69.85 mm): Label '5V@3A'
** ERC messages: 58 Errors 29 Warnings 29 ** ERC messages: 58 Errors 28 Warnings 30
** Ignored checks:
- Global label only appears once in the schematic
- Four connection points are joined together
- SPICE model issue
- Assigned footprint doesn't match footprint filters

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

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

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

@@ -5,7 +5,7 @@
"auto_track_width": true, "auto_track_width": true,
"hidden_netclasses": [], "hidden_netclasses": [],
"hidden_nets": [], "hidden_nets": [],
"high_contrast_mode": 0, "high_contrast_mode": 1,
"net_color_mode": 1, "net_color_mode": 1,
"opacity": { "opacity": {
"images": 0.6, "images": 0.6,
@@ -15,6 +15,7 @@
"vias": 1.0, "vias": 1.0,
"zones": 0.6 "zones": 0.6
}, },
"prototype_zone_fills": false,
"selection_filter": { "selection_filter": {
"dimensions": true, "dimensions": true,
"footprints": true, "footprints": true,
@@ -49,10 +50,11 @@
"conflict_shadows", "conflict_shadows",
"shapes" "shapes"
], ],
"visible_layers": "ffffffff_ffffffff_ffffffff_ffffffff", "visible_layers": "ffffffff_ffffffff_fffffdf5_ffffffff",
"zone_display_mode": 0 "zone_display_mode": 0
}, },
"git": { "git": {
"integration_disabled": false,
"repo_type": "", "repo_type": "",
"repo_username": "", "repo_username": "",
"ssh_key": "" "ssh_key": ""
@@ -72,6 +74,8 @@
false, false,
false, false,
false, false,
false,
false,
false false
], ],
"col_order": [ "col_order": [
@@ -84,19 +88,23 @@
6, 6,
7, 7,
8, 8,
9 9,
10,
11
], ],
"col_widths": [ "col_widths": [
0, 67,
0, 66,
0, 91,
0, 73,
0, 80,
0, 94,
0, 83,
0, 78,
0, 40,
0 43,
55,
1260
], ],
"custom_group_rules": [], "custom_group_rules": [],
"expanded_rows": [], "expanded_rows": [],
@@ -105,6 +113,7 @@
"filter_text": "", "filter_text": "",
"group_by_constraint": false, "group_by_constraint": false,
"group_by_netclass": false, "group_by_netclass": false,
"show_time_domain_details": false,
"show_unconnected_nets": false, "show_unconnected_nets": false,
"show_zero_pad_nets": false, "show_zero_pad_nets": false,
"sort_ascending": true, "sort_ascending": true,
@@ -115,6 +124,7 @@
"files": [] "files": []
}, },
"schematic": { "schematic": {
"hierarchy_collapsed": [],
"selection_filter": { "selection_filter": {
"graphics": true, "graphics": true,
"images": true, "images": true,
@@ -122,6 +132,7 @@
"lockedItems": false, "lockedItems": false,
"otherItems": true, "otherItems": true,
"pins": true, "pins": true,
"ruleAreas": true,
"symbols": true, "symbols": true,
"text": true, "text": true,
"wires": true "wires": true

View File

@@ -2,25 +2,263 @@
"board": { "board": {
"3dviewports": [], "3dviewports": [],
"design_settings": { "design_settings": {
"defaults": {}, "defaults": {
"diff_pair_dimensions": [], "apply_defaults_to_fp_barcodes": false,
"drc_exclusions": [], "apply_defaults_to_fp_dimensions": false,
"rules": {}, "apply_defaults_to_fp_fields": false,
"track_widths": [], "apply_defaults_to_fp_shapes": false,
"via_dimensions": [] "apply_defaults_to_fp_text": false,
"board_outline_line_width": 0.05,
"copper_line_width": 0.2,
"copper_text_italic": false,
"copper_text_size_h": 1.5,
"copper_text_size_v": 1.5,
"copper_text_thickness": 0.3,
"copper_text_upright": false,
"courtyard_line_width": 0.05,
"dimension_precision": 4,
"dimension_units": 3,
"dimensions": {
"arrow_length": 1270000,
"extension_offset": 500000,
"keep_text_aligned": true,
"suppress_zeroes": true,
"text_position": 0,
"units_format": 0
},
"fab_line_width": 0.1,
"fab_text_italic": false,
"fab_text_size_h": 1.0,
"fab_text_size_v": 1.0,
"fab_text_thickness": 0.15,
"fab_text_upright": false,
"other_line_width": 0.1,
"other_text_italic": false,
"other_text_size_h": 1.0,
"other_text_size_v": 1.0,
"other_text_thickness": 0.15,
"other_text_upright": false,
"pads": {
"drill": 0.0,
"height": 0.95,
"width": 0.8
},
"silk_line_width": 0.1,
"silk_text_italic": false,
"silk_text_size_h": 1.0,
"silk_text_size_v": 1.0,
"silk_text_thickness": 0.1,
"silk_text_upright": false,
"zones": {
"min_clearance": 0.5
}
},
"diff_pair_dimensions": [
{
"gap": 0.0,
"via_gap": 0.0,
"width": 0.0
}
],
"drc_exclusions": [
[
"courtyards_overlap|39255000|68870000|e06bdfe1-53ae-4fc2-b728-570ca465444f|e2dcf49c-eee1-4d66-a3a4-d1ffe470ec14",
"no they dont"
]
],
"meta": {
"version": 2
},
"rule_severities": {
"annular_width": "error",
"clearance": "error",
"connection_width": "warning",
"copper_edge_clearance": "error",
"copper_sliver": "warning",
"courtyards_overlap": "error",
"creepage": "error",
"diff_pair_gap_out_of_range": "error",
"diff_pair_uncoupled_length_too_long": "error",
"drill_out_of_range": "error",
"duplicate_footprints": "warning",
"extra_footprint": "warning",
"footprint": "error",
"footprint_filters_mismatch": "ignore",
"footprint_symbol_field_mismatch": "warning",
"footprint_symbol_mismatch": "warning",
"footprint_type_mismatch": "ignore",
"hole_clearance": "error",
"hole_to_hole": "warning",
"holes_co_located": "warning",
"invalid_outline": "error",
"isolated_copper": "warning",
"item_on_disabled_layer": "error",
"items_not_allowed": "error",
"length_out_of_range": "error",
"lib_footprint_issues": "warning",
"lib_footprint_mismatch": "warning",
"malformed_courtyard": "error",
"microvia_drill_out_of_range": "error",
"mirrored_text_on_front_layer": "warning",
"missing_courtyard": "ignore",
"missing_footprint": "warning",
"missing_tuning_profile": "warning",
"net_conflict": "warning",
"nonmirrored_text_on_back_layer": "warning",
"npth_inside_courtyard": "ignore",
"padstack": "warning",
"pth_inside_courtyard": "ignore",
"shorting_items": "error",
"silk_edge_clearance": "warning",
"silk_over_copper": "warning",
"silk_overlap": "warning",
"skew_out_of_range": "error",
"solder_mask_bridge": "error",
"starved_thermal": "error",
"text_height": "warning",
"text_on_edge_cuts": "error",
"text_thickness": "warning",
"through_hole_pad_without_hole": "error",
"too_many_vias": "error",
"track_angle": "error",
"track_dangling": "warning",
"track_not_centered_on_via": "ignore",
"track_on_post_machined_layer": "error",
"track_segment_length": "error",
"track_width": "error",
"tracks_crossing": "error",
"tuning_profile_track_geometries": "ignore",
"unconnected_items": "error",
"unresolved_variable": "error",
"via_dangling": "warning",
"zones_intersect": "error"
},
"rules": {
"max_error": 0.005,
"min_clearance": 0.0,
"min_connection": 0.0,
"min_copper_edge_clearance": 0.5,
"min_groove_width": 0.0,
"min_hole_clearance": 0.25,
"min_hole_to_hole": 0.25,
"min_microvia_diameter": 0.2,
"min_microvia_drill": 0.1,
"min_resolved_spokes": 2,
"min_silk_clearance": 0.0,
"min_text_height": 0.8,
"min_text_thickness": 0.08,
"min_through_hole_diameter": 0.3,
"min_track_width": 0.0,
"min_via_annular_width": 0.1,
"min_via_diameter": 0.5,
"solder_mask_to_copper_clearance": 0.0,
"use_height_for_length_calcs": true
},
"teardrop_options": [
{
"td_onpthpad": true,
"td_onroundshapesonly": false,
"td_onsmdpad": true,
"td_ontrackend": false,
"td_onvia": true
}
],
"teardrop_parameters": [
{
"td_allow_use_two_tracks": true,
"td_curve_segcount": 0,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_on_pad_in_zone": false,
"td_target_name": "td_round_shape",
"td_width_to_size_filter_ratio": 0.9
},
{
"td_allow_use_two_tracks": true,
"td_curve_segcount": 0,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_on_pad_in_zone": false,
"td_target_name": "td_rect_shape",
"td_width_to_size_filter_ratio": 0.9
},
{
"td_allow_use_two_tracks": true,
"td_curve_segcount": 0,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_on_pad_in_zone": false,
"td_target_name": "td_track_end",
"td_width_to_size_filter_ratio": 0.9
}
],
"track_widths": [
0.0,
1.0
],
"tuning_pattern_settings": {
"diff_pair_defaults": {
"corner_radius_percentage": 80,
"corner_style": 1,
"max_amplitude": 1.0,
"min_amplitude": 0.2,
"single_sided": false,
"spacing": 1.0
},
"diff_pair_skew_defaults": {
"corner_radius_percentage": 80,
"corner_style": 1,
"max_amplitude": 1.0,
"min_amplitude": 0.2,
"single_sided": false,
"spacing": 0.6
},
"single_track_defaults": {
"corner_radius_percentage": 80,
"corner_style": 1,
"max_amplitude": 1.0,
"min_amplitude": 0.2,
"single_sided": false,
"spacing": 0.6
}
},
"via_dimensions": [
{
"diameter": 0.0,
"drill": 0.0
}
],
"zones_allow_external_fillets": false
}, },
"ipc2581": { "ipc2581": {
"bom_rev": "",
"dist": "", "dist": "",
"distpn": "", "distpn": "",
"internal_id": "", "internal_id": "",
"mfg": "", "mfg": "",
"mpn": "" "mpn": "",
"sch_revision": ""
}, },
"layer_pairs": [], "layer_pairs": [],
"layer_presets": [], "layer_presets": [],
"viewports": [] "viewports": []
}, },
"boards": [], "boards": [],
"component_class_settings": {
"assignments": [],
"meta": {
"version": 0
},
"sheet_component_classes": {
"enabled": false
}
},
"cvpcb": { "cvpcb": {
"equivalence_files": [] "equivalence_files": []
}, },
@@ -210,11 +448,14 @@
"duplicate_sheet_names": "error", "duplicate_sheet_names": "error",
"endpoint_off_grid": "warning", "endpoint_off_grid": "warning",
"extra_units": "error", "extra_units": "error",
"field_name_whitespace": "warning",
"footprint_filter": "ignore", "footprint_filter": "ignore",
"footprint_link_issues": "warning", "footprint_link_issues": "warning",
"four_way_junction": "ignore", "four_way_junction": "ignore",
"global_label_dangling": "warning", "global_label_dangling": "warning",
"ground_pin_not_ground": "warning",
"hier_label_mismatch": "error", "hier_label_mismatch": "error",
"isolated_pin_label": "warning",
"label_dangling": "error", "label_dangling": "error",
"label_multiple_wires": "warning", "label_multiple_wires": "warning",
"lib_symbol_issues": "warning", "lib_symbol_issues": "warning",
@@ -237,6 +478,7 @@
"similar_power": "warning", "similar_power": "warning",
"simulation_model_issue": "ignore", "simulation_model_issue": "ignore",
"single_global_label": "ignore", "single_global_label": "ignore",
"stacked_pin_name": "warning",
"unannotated": "error", "unannotated": "error",
"unconnected_wire_endpoint": "warning", "unconnected_wire_endpoint": "warning",
"undefined_netclass": "error", "undefined_netclass": "error",
@@ -269,13 +511,14 @@
"priority": 2147483647, "priority": 2147483647,
"schematic_color": "rgba(0, 0, 0, 0.000)", "schematic_color": "rgba(0, 0, 0, 0.000)",
"track_width": 0.2, "track_width": 0.2,
"tuning_profile": "",
"via_diameter": 0.6, "via_diameter": 0.6,
"via_drill": 0.3, "via_drill": 0.3,
"wire_width": 6 "wire_width": 6
} }
], ],
"meta": { "meta": {
"version": 4 "version": 5
}, },
"net_colors": null, "net_colors": null,
"netclass_assignments": null, "netclass_assignments": null,
@@ -286,7 +529,7 @@
"gencad": "", "gencad": "",
"idf": "", "idf": "",
"netlist": "", "netlist": "",
"plot": "", "plot": "../../PCBs/",
"pos_files": "", "pos_files": "",
"specctra_dsn": "", "specctra_dsn": "",
"step": "", "step": "",
@@ -297,6 +540,10 @@
}, },
"schematic": { "schematic": {
"annotate_start_num": 0, "annotate_start_num": 0,
"annotation": {
"method": 0,
"sort_order": 0
},
"bom_export_filename": "${PROJECTNAME}.csv", "bom_export_filename": "${PROJECTNAME}.csv",
"bom_fmt_presets": [], "bom_fmt_presets": [],
"bom_fmt_settings": { "bom_fmt_settings": {
@@ -452,6 +699,7 @@
"sort_asc": true, "sort_asc": true,
"sort_field": "Reference" "sort_field": "Reference"
}, },
"bus_aliases": {},
"connection_grid_size": 50.0, "connection_grid_size": 50.0,
"drawing": { "drawing": {
"dashed_lines_dash_length_ratio": 12.0, "dashed_lines_dash_length_ratio": 12.0,
@@ -480,6 +728,7 @@
"visible": false "visible": false
} }
], ],
"hop_over_size_choice": 0,
"intersheets_ref_own_page": false, "intersheets_ref_own_page": false,
"intersheets_ref_prefix": "", "intersheets_ref_prefix": "",
"intersheets_ref_short": false, "intersheets_ref_short": false,
@@ -503,6 +752,7 @@
"net_format_name": "", "net_format_name": "",
"page_layout_descr_file": "", "page_layout_descr_file": "",
"plot_directory": "", "plot_directory": "",
"reuse_designators": true,
"space_save_all_events": true, "space_save_all_events": true,
"spice_current_sheet_as_root": false, "spice_current_sheet_as_root": false,
"spice_external_command": "spice \"%I\"", "spice_external_command": "spice \"%I\"",
@@ -511,12 +761,21 @@
"spice_save_all_dissipations": false, "spice_save_all_dissipations": false,
"spice_save_all_voltages": false, "spice_save_all_voltages": false,
"subpart_first_id": 65, "subpart_first_id": 65,
"subpart_id_separator": 0 "subpart_id_separator": 0,
"top_level_sheets": [
{
"filename": "esp32-racer.kicad_sch",
"name": "esp32-racer",
"uuid": "1d580319-54a9-438f-a4a3-ea2f61f357b8"
}
],
"used_designators": "R65,TP1-2",
"variants": []
}, },
"sheets": [ "sheets": [
[ [
"1d580319-54a9-438f-a4a3-ea2f61f357b8", "1d580319-54a9-438f-a4a3-ea2f61f357b8",
"Root" "esp32-racer"
], ],
[ [
"2494d45e-acf4-40f6-9a55-62c15b4ed8bc", "2494d45e-acf4-40f6-9a55-62c15b4ed8bc",
@@ -555,5 +814,11 @@
"POWER_CONNECTORS" "POWER_CONNECTORS"
] ]
], ],
"text_variables": {} "text_variables": {},
"tuning_profiles": {
"meta": {
"version": 0
},
"tuning_profiles_impedance_geometric": []
}
} }

File diff suppressed because it is too large Load Diff

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 346 KiB

13
res/rabbit.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.7 KiB

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"

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