Skip to content

Commit 159284b

Browse files
committed
feat(uno): add arduino logo
1 parent e0e0086 commit 159284b

File tree

2 files changed

+48
-10
lines changed

2 files changed

+48
-10
lines changed

src/arduino-uno-element.stories.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,15 @@ storiesOf('Arduino Uno', module)
1515
.ledTX=${boolean('TX LED', false)}
1616
></wokwi-7segment>
1717
`
18+
)
19+
.add(
20+
'Uno R3 (Large)',
21+
() => html`
22+
<wokwi-arduino-uno style="zoom: 2"
23+
.led13=${boolean('LED 13', false)}
24+
.ledPower=${boolean('Power LED', true)}
25+
.ledRX=${boolean('RX LED', false)}
26+
.ledTX=${boolean('TX LED', false)}
27+
></wokwi-7segment>
28+
`
1829
);

src/arduino-uno-element.ts

Lines changed: 37 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class ArduinoUnoElement extends LitElement {
1515
height="53.34mm"
1616
version="1.1"
1717
viewBox="-4 0 72.58 53.34"
18-
style="font-size: 2px; font-family: sans-serif"
18+
style="font-size: 2px; font-family: monospace"
1919
xmlns="http://www.w3.org/2000/svg"
2020
>
2121
<defs>
@@ -74,10 +74,12 @@ export class ArduinoUnoElement extends LitElement {
7474
/>
7575
7676
<!-- USB Connector -->
77-
<rect width="11" height="11.93" x="-0.05" y="9.72" rx="0.2" ry="0.2" opacity="0.235" />
7877
<g style="fill:#b3b2b2;stroke:#b3b2b2;stroke-width:0.010">
7978
<ellipse cx="3.84" cy="9.56" rx="1.12" ry="1.03" />
8079
<ellipse cx="3.84" cy="21.04" rx="1.12" ry="1.03" />
80+
<g fill="#000">
81+
<rect width="11" height="11.93" x="-0.05" y="9.72" rx="0.2" ry="0.2" opacity="0.24" />
82+
</g>
8183
<rect x="-4" y="9.37" height="11.85" width="14.46" />
8284
<rect x="-4" y="9.61" height="11.37" width="14.05" fill="#706f6f" />
8385
<rect x="-4" y="9.71" height="11.17" width="13.95" fill="#9d9d9c" />
@@ -200,7 +202,7 @@ export class ArduinoUnoElement extends LitElement {
200202
svg`<circle cx="0.975" cy="0.55" r="1.3" fill="yellow" filter="url(#ledFilter)" />`}
201203
</g>
202204
203-
<text fill="#fff" style="text-anchor: end;">
205+
<text fill="#fff" style="text-anchor: end">
204206
<tspan x="26.5" y="13">L</tspan>
205207
<tspan x="26.5" y="17.5">TX</tspan>
206208
<tspan x="26.5" y="19.8">RX</tspan>
@@ -215,7 +217,7 @@ export class ArduinoUnoElement extends LitElement {
215217
<text
216218
transform="translate(22.6 4) rotate(270 0 0)"
217219
fill="#fff"
218-
style="font-size: 2px; text-anchor: end; font-family: sans-serif; font-weight: 800"
220+
style="font-size: 2px; text-anchor: end; font-family: monospace"
219221
>
220222
<tspan x="0" dy="2.54">AREF</tspan>
221223
<tspan x="0" dy="2.54">GND</tspan>
@@ -231,18 +233,16 @@ export class ArduinoUnoElement extends LitElement {
231233
<tspan x="0" dy="2.54">4</tspan>
232234
<tspan x="0" dy="2.54">~3</tspan>
233235
<tspan x="0" dy="2.54">2</tspan>
234-
<tspan x="0" dy="2.54">TX→</tspan>
235-
<tspan dx="0.2">1</tspan>
236-
<tspan x="0" dy="2.54">RX←</tspan>
237-
<tspan dx="0.2">0</tspan>
236+
<tspan x="0" dy="2.54">TX→1</tspan>
237+
<tspan x="0" dy="2.54">RX←0</tspan>
238238
<tspan x="0" dy="2.54">&nbsp;</tspan>
239239
</text>
240240
241241
<rect x="33.90" y="42.76" width="12.84" height="0.16" fill="#fff"></rect>
242242
<rect x="49.48" y="42.76" width="14.37" height="0.16" fill="#fff"></rect>
243243
<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>
244+
<tspan x="41" y="44.96">POWER</tspan>
245+
<tspan x="53.5" y="44.96">ANALOG IN</tspan>
246246
</text>
247247
<text transform="translate(29.19 49) rotate(270 0 0)" fill="#fff" style="font-weight: 700">
248248
<tspan x="0" dy="2.54">IOREF</tspan>
@@ -260,6 +260,33 @@ export class ArduinoUnoElement extends LitElement {
260260
<tspan x="0" dy="2.54">A5</tspan>
261261
<tspan x="0" dy="2.54">&nbsp;</tspan>
262262
</text>
263+
264+
<!-- Logo -->
265+
<path
266+
style="fill:none;stroke:#fff;stroke-width:1.03"
267+
d="m 34.21393,12.01079 c -1.66494,-0.13263 -3.06393,1.83547 -2.37559,3.36182 0.66469,1.65332 3.16984,2.10396 4.36378,0.77797 1.15382,-1.13053 1.59956,-2.86476 3.00399,-3.75901 1.43669,-0.9801 3.75169,-0.0547 4.02384,1.68886 0.27358,1.66961 -1.52477,3.29596 -3.15725,2.80101 -1.20337,-0.27199 -2.06928,-1.29866 -2.56193,-2.37788 -0.6046,-1.0328 -1.39499,-2.13327 -2.62797,-2.42367 -0.2191,-0.0497 -0.44434,-0.0693 -0.66887,-0.0691 z"
268+
/>
269+
<path
270+
style="fill:none;stroke:#fff;stroke-width:0.56"
271+
d="m 39.67829,14.37519 h 1.75141 m -0.89321,-0.8757 v 1.7514 m -7.30334,-0.8757 h 2.10166"
272+
/>
273+
<text x="31" y="20.2" style="font-size:2.8px;font-weight:bold;line-height:1.25;fill:#fff">
274+
ARDUINO
275+
</text>
276+
277+
<rect
278+
style="fill:none;stroke:#fff;stroke-width:0.1;stroke-dasharray:0.1, 0.1"
279+
width="11"
280+
height="5.45"
281+
x="45.19"
282+
y="11.83"
283+
rx="1"
284+
ry="1"
285+
/>
286+
287+
<text x="46.5" y="16" style="font-size:5px; line-height:1.25" fill="#fff">
288+
UNO
289+
</text>
263290
</svg>
264291
`;
265292
}

0 commit comments

Comments
 (0)