Skip to content

Commit e0e0086

Browse files
committed
feat(uno): add programming headers + more labels
1 parent 12cd209 commit e0e0086

File tree

1 file changed

+44
-19
lines changed

1 file changed

+44
-19
lines changed

src/arduino-uno-element.ts

Lines changed: 44 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,15 @@ export class ArduinoUnoElement extends LitElement {
1313
<svg
1414
width="72.58mm"
1515
height="53.34mm"
16-
clip-rule="evenodd"
17-
fill-rule="evenodd"
18-
stroke-linecap="round"
19-
stroke-linejoin="round"
20-
stroke-width="0"
2116
version="1.1"
2217
viewBox="-4 0 72.58 53.34"
18+
style="font-size: 2px; font-family: sans-serif"
2319
xmlns="http://www.w3.org/2000/svg"
2420
>
2521
<defs>
2622
<g id="led-body" fill="#eee">
27-
<path
28-
d="m1.995 0.024v0.289a0.217 0.239 0 0 0-0.178 0.235 0.217 0.239 0 0 0 0.178 0.235v0.282h-1.995v-0.29a0.217 0.239 0 0 0 0.198-0.238 0.217 0.239 0 0 0-0.198-0.238v-0.275z"
29-
fill="#c6c6c6"
30-
/>
31-
<rect x="0.3" y="-0.15" width="1.35" height="1.4" stroke="#aaa" stroke-width="0.05" />
23+
<rect x="0" y="0" height="1.2" width="2.6" fill="#c6c6c6" />
24+
<rect x="0.6" y="-0.1" width="1.35" height="1.4" stroke="#aaa" stroke-width="0.05" />
3225
</g>
3326
</defs>
3427
@@ -61,6 +54,12 @@ export class ArduinoUnoElement extends LitElement {
6154
></path>
6255
</pattern>
6356
57+
<pattern id="pin-male" width="2.54" height="4.80" patternUnits="userSpaceOnUse">
58+
<rect ry="0.3" rx="0.3" width="2.12" height="4.80" fill="#565656" />
59+
<ellipse cx="1" cy="1.13" rx="0.5" ry="0.5" fill="#aaa"></ellipse>
60+
<ellipse cx="1" cy="3.67" rx="0.5" ry="0.5" fill="#aaa"></ellipse>
61+
</pattern>
62+
6463
<pattern id="mcu-leads" width="2.54" height="0.508" patternUnits="userSpaceOnUse">
6564
<path
6665
d="M 0.254,0 C 0.114,0 0,0.114 0,0.254 v 0 c 0,0.139 0,0.253 0,0.253 h 1.523 c 0,0 0,-0.114 0,-0.253 v 0 C 1.523,0.114 1.409,0 1.269,0 Z"
@@ -163,17 +162,30 @@ export class ArduinoUnoElement extends LitElement {
163162
<circle cx="59.939" cy="36.847" r="1.016" fill="#252728" />
164163
</g>
165164
165+
<!-- Programming Headers -->
166+
<g transform="translate(14.1 4.4)">
167+
<rect width="7" height="4.80" fill="url(#pin-male)" />
168+
</g>
169+
170+
<g transform="translate(63 27.2) rotate(270 0 0)">
171+
<rect width="7" height="4.80" fill="url(#pin-male)" />
172+
</g>
173+
166174
<!-- LEDs -->
167175
<g transform="translate(57.3, 16.21)">
168176
<use xlink:href="#led-body" />
169177
${ledPower &&
170-
svg`<circle cx="0.975" cy="0.55" r="1.3" fill="#80ff80" filter="url(#ledFilter)" />`}
178+
svg`<circle cx="1.3" cy="0.55" r="1.3" fill="#80ff80" filter="url(#ledFilter)" />`}
171179
</g>
172180
173-
<g transform="translate(26.9, 10.62)">
181+
<text fill="#fff">
182+
<tspan x="60.88" y="17.5">ON</tspan>
183+
</text>
184+
185+
<g transform="translate(26.87,11.69)">
174186
<use xlink:href="#led-body" />
175187
${led13 &&
176-
svg`<circle cx="0.975" cy="0.55" r="1.3" fill="#ff8080" filter="url(#ledFilter)" />`}
188+
svg`<circle cx="1.3" cy="0.55" r="1.3" fill="#ff8080" filter="url(#ledFilter)" />`}
177189
</g>
178190
179191
<g transform="translate(26.9, 16.2)">
@@ -188,7 +200,18 @@ export class ArduinoUnoElement extends LitElement {
188200
svg`<circle cx="0.975" cy="0.55" r="1.3" fill="yellow" filter="url(#ledFilter)" />`}
189201
</g>
190202
191-
<!-- Labels -->
203+
<text fill="#fff" style="text-anchor: end;">
204+
<tspan x="26.5" y="13">L</tspan>
205+
<tspan x="26.5" y="17.5">TX</tspan>
206+
<tspan x="26.5" y="19.8">RX</tspan>
207+
<tspan x="26.5" y="20">&nbsp;</tspan>
208+
</text>
209+
210+
<!-- Pin Labels -->
211+
<rect x="28.27" y="10.34" width="36.5" height="0.16" fill="#fff"></rect>
212+
<text fill="#fff" style="font-weight: 900">
213+
<tspan x="40.84" y="9.48">DIGITAL (PWM ~)</tspan>
214+
</text>
192215
<text
193216
transform="translate(22.6 4) rotate(270 0 0)"
194217
fill="#fff"
@@ -215,11 +238,13 @@ export class ArduinoUnoElement extends LitElement {
215238
<tspan x="0" dy="2.54">&nbsp;</tspan>
216239
</text>
217240
218-
<text
219-
transform="translate(29.19 49) rotate(270 0 0)"
220-
fill="#fff"
221-
style="font-size: 2px; font-family: sans-serif; font-weight: 800"
222-
>
241+
<rect x="33.90" y="42.76" width="12.84" height="0.16" fill="#fff"></rect>
242+
<rect x="49.48" y="42.76" width="14.37" height="0.16" fill="#fff"></rect>
243+
<text fill="#fff" style="font-weight: 900">
244+
<tspan x="39.28" y="44.96">POWER</tspan>
245+
<tspan x="52.74" y="44.96">ANALOG IN</tspan>
246+
</text>
247+
<text transform="translate(29.19 49) rotate(270 0 0)" fill="#fff" style="font-weight: 700">
223248
<tspan x="0" dy="2.54">IOREF</tspan>
224249
<tspan x="0" dy="2.54">RESET</tspan>
225250
<tspan x="0" dy="2.54">3.3V</tspan>

0 commit comments

Comments
 (0)