0hmX/play-test
This code defines a compact electronic circuit with a battery, switch, three resistors, and nine LEDs arranged in three rows, with connections illustrating power, switching, and LED pathways.
- Version
- 0.0.1
- License
- unset
- Stars
- 0
matrix-4.tsx
export default () => {
return (
<board width="45mm" height="35mm">
<chip
name="BT1"
footprint="pinrow2"
pinLabels={{ pin1: "plus", pin2: "minus" }}
pcbX={-18}
pcbY={12}
schX={-5}
schY={3}
/>
<chip
name="SW1"
footprint="pinrow2"
pinLabels={{ pin1: "in", pin2: "out" }}
pcbX={-8}
pcbY={12}
schX={-2}
schY={3}
/>
<resistor
name="R1"
resistance="330"
footprint="0603"
pcbX={2}
pcbY={6}
schX={1}
schY={1}
/>
<resistor
name="R2"
resistance="330"
footprint="0603"
pcbX={2}
pcbY={-6}
schX={1}
schY={-1}
/>
<chip
name="D1"
footprint="0603"
pinLabels={{ pin1: "a", pin2: "c" }}
pcbX={12}
pcbY={6}
schX={4}
schY={1}
/>
<chip
name="D2"
footprint="0603"
pinLabels={{ pin1: "a", pin2: "c" }}
pcbX={22}
pcbY={6}
schX={7}
schY={1}
/>
<chip
name="D3"
footprint="0603"
pinLabels={{ pin1: "a", pin2: "c" }}
pcbX={12}
pcbY={-6}
schX={4}
schY={-1}
/>
<chip
name="D4"
footprint="0603"
pinLabels={{ pin1: "a", pin2: "c" }}
pcbX={22}
pcbY={-6}
schX={7}
schY={-1}
/>
{/* Power path */}
<trace from=".BT1 > .plus" to=".SW1 > .in" />
<trace from=".SW1 > .out" to=".R1 > .left" />
<trace from=".SW1 > .out" to=".R2 > .left" />
{/* Row nets */}
<trace name="ROW1" from=".R1 > .right" to=".D1 > .a" />
<trace name="ROW1" from=".D1 > .a" to=".D2 > .a" />
<trace name="ROW2" from=".R2 > .right" to=".D3 > .a" />
<trace name="ROW2" from=".D3 > .a" to=".D4 > .a" />
{/* Ground net */}
<trace name="GND" from=".BT1 > .minus" to=".D1 > .c" />
<trace name="GND" from=".D1 > .c" to=".D2 > .c" />
<trace name="GND" from=".D1 > .c" to=".D3 > .c" />
<trace name="GND" from=".D3 > .c" to=".D4 > .c" />
</board>
)
}