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

index.tsx

PCBPCB preview for index.tsx
SchematicSchematic preview for index.tsx
export default () => {
  return (
    <board width="55mm" height="40mm">
      <chip
        name="BT1"
        footprint="pinrow2"
        pinLabels={{ pin1: "plus", pin2: "minus" }}
      />

      <chip
        name="SW1"
        footprint="pinrow2"
        pinLabels={{ pin1: "in", pin2: "out" }}
      />

      <resistor name="R1" resistance="330" footprint="0603" />
      <resistor name="R2" resistance="330" footprint="0603" />
      <resistor name="R3" resistance="330" footprint="0603" />

      <chip name="D1" footprint="0603" pinLabels={{ pin1: "a", pin2: "c" }} />
      <chip name="D2" footprint="0603" pinLabels={{ pin1: "a", pin2: "c" }} />
      <chip name="D3" footprint="0603" pinLabels={{ pin1: "a", pin2: "c" }} />

      <chip name="D4" footprint="0603" pinLabels={{ pin1: "a", pin2: "c" }} />
      <chip name="D5" footprint="0603" pinLabels={{ pin1: "a", pin2: "c" }} />
      <chip name="D6" footprint="0603" pinLabels={{ pin1: "a", pin2: "c" }} />

      <chip name="D7" footprint="0603" pinLabels={{ pin1: "a", pin2: "c" }} />
      <chip name="D8" footprint="0603" pinLabels={{ pin1: "a", pin2: "c" }} />
      <chip name="D9" footprint="0603" pinLabels={{ pin1: "a", pin2: "c" }} />

      {/* Power path */}
      <trace from=".BT1 > .plus" to=".SW1 > .in" />
      <trace from=".SW1 > .out" to=".R1 > .left" />
      <trace from=".SW1 > .out" to=".R2 > .left" />
      <trace from=".SW1 > .out" to=".R3 > .left" />

      {/* Row nets */}
      <trace name="ROW1" from=".R1 > .right" to=".D1 > .a" />
      <trace name="ROW1" from=".D1 > .a" to=".D2 > .a" />
      <trace name="ROW1" from=".D2 > .a" to=".D3 > .a" />

      <trace name="ROW2" from=".R2 > .right" to=".D4 > .a" />
      <trace name="ROW2" from=".D4 > .a" to=".D5 > .a" />
      <trace name="ROW2" from=".D5 > .a" to=".D6 > .a" />

      <trace name="ROW3" from=".R3 > .right" to=".D7 > .a" />
      <trace name="ROW3" from=".D7 > .a" to=".D8 > .a" />
      <trace name="ROW3" from=".D8 > .a" to=".D9 > .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=".D2 > .c" to=".D3 > .c" />

      <trace name="GND" from=".D1 > .c" to=".D4 > .c" />
      <trace name="GND" from=".D4 > .c" to=".D5 > .c" />
      <trace name="GND" from=".D5 > .c" to=".D6 > .c" />

      <trace name="GND" from=".D4 > .c" to=".D7 > .c" />
      <trace name="GND" from=".D7 > .c" to=".D8 > .c" />
      <trace name="GND" from=".D8 > .c" to=".D9 > .c" />
    </board>
  )
}