seveibar/pico-w-3x5-led-matrix

A 15-LED WS2812B RGB matrix with a Raspberry Pi Pico W, connected in a daisy-chain configuration and powered via 5V, controlled by the microcontroller's GPIO pins.

Usage: To import and use the "@tsci/seveibar.pico-w-3x5-led-matrix" component: 1. Import the component in your project: ```tsx import PicoLedMatrix from "@tsci/seveibar.pico-w-3x5-led-matrix" ``` 2. Use the component in a circuit board: ```tsx export default () => ( <board> <PicoLedMatrix /> </board> ) ``` The component creates a 3x5 LED matrix connected to a Raspberry Pi Pico W, with automatic grid layout and tracing between LEDs and the microcontroller. Key features: - Generates a 3x5 LED grid - Automatically connects LEDs - Includes Pico W placement - Uses WS2812B LEDs - Configures power and ground connections

Version
0.0.1
License
unset
Stars
4

dist/index.cjs

PCBPCB preview for dist/index.cjs
SchematicSchematic preview for dist/index.cjs
'use strict';

var core = require('@tscircuit/core');

function _extends$1() { return _extends$1 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$1.apply(null, arguments); }
const pinLabels$1 = {
  pin1: ["pin1", "DO"],
  pin2: ["pin2", "GND"],
  pin3: ["pin3", "DI"],
  pin4: ["pin4", "VDD"]
};
const WS2812B_2020 = props => {
  return /*#__PURE__*/React.createElement("chip", _extends$1({}, props, {
    cadModel: {
      objUrl: "https://modelcdn.tscircuit.com/easyeda_models/download?uuid=caa88715b11f4aa189b02e52bbb84e4f&pn=C965555",
      rotationOffset: {
        x: 0,
        y: 0,
        z: 0
      },
      positionOffset: {
        x: 0,
        y: 0,
        z: -0.07
      }
    },
    schPortArrangement: {
      leftSide: {
        direction: "top-to-bottom",
        pins: ["DI", "GND"]
      },
      rightSide: {
        direction: "top-to-bottom",
        pins: ["VDD", "DO"]
      }
    },
    pinLabels: pinLabels$1,
    supplierPartNumbers: {
      jlcpcb: ["C965555"]
    },
    manufacturerPartNumber: "WS2812B_2020",
    footprint: /*#__PURE__*/React.createElement("footprint", null, /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin1"],
      pcbX: "-0.9150349999999889mm",
      pcbY: "0.5500369999999748mm",
      width: "0.8999982mm",
      height: "0.6999986mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin2"],
      pcbX: "-0.9150349999999889mm",
      pcbY: "-0.5500369999999748mm",
      width: "0.8999982mm",
      height: "0.6999986mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin3"],
      pcbX: "0.9150349999999889mm",
      pcbY: "-0.5500369999999748mm",
      width: "0.8999982mm",
      height: "0.6999986mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin4"],
      pcbX: "0.9150349999999889mm",
      pcbY: "0.5500369999999748mm",
      width: "0.8999982mm",
      height: "0.6999986mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        x: -0.24998679999998785,
        y: 0.7499603999999636
      }, {
        x: -0.09999980000009145,
        y: 0.7499603999999636
      }, {
        x: -0.09999980000009145,
        y: -0.6500114000000394
      }, {
        x: -0.09999980000009145,
        y: -0.6999986000000717
      }, {
        x: -0.24998679999998785,
        y: -0.6999986000000717
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        x: -0.24998679999998785,
        y: 0.7499603999999636
      }, {
        x: -0.24998679999998785,
        y: -0.7000239999999849
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        x: -1.299997400000052,
        y: 1.1499850000000151
      }, {
        x: -1.299997400000052,
        y: 1.1381486000000223
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        x: 0.9999979999998914,
        y: 1.0999977999999828
      }, {
        x: -0.999998000000005,
        y: 1.0999977999999828
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        x: -0.999998000000005,
        y: -1.0999977999999828
      }, {
        x: 0.9999979999998914,
        y: -1.0999977999999828
      }]
    }))
  }));
};
core.createUseComponent(WS2812B_2020, pinLabels$1);

function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
const pinLabels = {
  "pin1": ["pin1", "GP0_SPI0RX_I2C0SDA_UART0TX"],
  "pin2": ["pin2", "GP1_SPI0CSn_I2C0SCL_UART0RX"],
  "pin3": ["pin3", "GND1"],
  "pin4": ["pin4", "GP2_SPI0SCK_I2C1SDA"],
  "pin5": ["pin5", "GP3_SPI0TX_I2C1SCL"],
  "pin6": ["pin6", "GP4_SPI0RX_I2C0SDA_UART1TX"],
  "pin7": ["pin7", "GP5_SPI0CSn_I2C0SCL_UART1RX"],
  "pin8": ["pin8", "GND3"],
  "pin9": ["pin9", "GP6_SPI0SCK_I2C1SDA"],
  "pin10": ["pin10", "GP7_SPI0TX_I2C1SCL"],
  "pin11": ["pin11", "GP8_SPI1RX_I2C0SDA_UART1TX"],
  "pin12": ["pin12", "GP9_SPI1CSn_I2C0SCL_UART1RX"],
  "pin13": ["pin13", "GND4"],
  "pin14": ["pin14", "GP10_SPI1SCK_I2C1SDA"],
  "pin15": ["pin15", "GP11_SPI1TX_I2C1SCL"],
  "pin16": ["pin16", "GP12_SPI1RX_I2C0SDA_UART0TX"],
  "pin17": ["pin17", "GP13_SPI1CSn_I2C0SCL_UART0RX"],
  "pin18": ["pin18", "GND6"],
  "pin19": ["pin19", "GP14_SPI1SCK_I2C1SDA"],
  "pin20": ["pin20", "GP15_SPI1TX_I2C1SCL"],
  "pin21": ["pin21", "GP16_SPI0RX_UART0RX"],
  "pin22": ["pin22", "GP17_SPI0CSn_UART0TX"],
  "pin23": ["pin23", "GND7"],
  "pin24": ["pin24", "GP18_SPI0SCK_I2C1SDA"],
  "pin25": ["pin25", "GP19_SPI0TX_I2C1SCL"],
  "pin26": ["pin26", "GP20_I2C0SDA"],
  "pin27": ["pin27", "GP21_I2C0SCL"],
  "pin28": ["pin28", "GND5"],
  "pin29": ["pin29", "GP22"],
  "pin30": ["pin30", "RUN"],
  "pin31": ["pin31", "GP26_ADC0_I2C1SDA"],
  "pin32": ["pin32", "GP27_ADC1_I2C1SCL"],
  "pin33": ["pin33", "GND_AGND"],
  "pin34": ["pin34", "GP28_ADC2"],
  "pin35": ["pin35", "ADC_VREF"],
  "pin36": ["pin36"],
  "pin37": ["pin37", "3V3_EN"],
  "pin38": ["pin38", "GND2"],
  "pin39": ["pin39", "VSYS"],
  "pin40": ["pin40", "VBUS"],
  "pin41": ["pin41", "TP6"],
  "pin42": ["pin42", "TP5"],
  "pin43": ["pin43", "TP4"],
  "pin44": ["pin44", "TP3"],
  "pin45": ["pin45", "TP2"],
  "pin46": ["pin46", "TP1"]
};
const PICO_W = props => {
  return /*#__PURE__*/React.createElement("chip", _extends({}, props, {
    schWidth: 5,
    cadModel: {
      objUrl: "https://modelcdn.tscircuit.com/easyeda_models/download?uuid=07c2e528ec9a4008b33211831b7000e1&pn=C7203003",
      rotationOffset: {
        x: 0,
        y: 0,
        z: 0
      },
      positionOffset: {
        x: 0,
        y: 0,
        z: 0
      }
    },
    pinLabels: pinLabels,
    supplierPartNumbers: {
      "jlcpcb": ["C7203003"]
    },
    manufacturerPartNumber: "PICO_W",
    footprint: /*#__PURE__*/React.createElement("footprint", null, /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin41"],
      pcbX: "-10.940014949999977mm",
      pcbY: "-2.499740999999972mm",
      width: "1.499997mm",
      height: "1.499997mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin42"],
      pcbX: "-13.44013695000001mm",
      pcbY: "-2.499740999999972mm",
      width: "1.499997mm",
      height: "1.499997mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin43"],
      pcbX: "-15.940004950000002mm",
      pcbY: "-2.499740999999972mm",
      width: "1.499997mm",
      height: "1.499997mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin44"],
      pcbX: "-24.239962950000063mm",
      pcbY: "-0.999870999999871mm",
      width: "1.499997mm",
      height: "1.499997mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin45"],
      pcbX: "-24.239962950000063mm",
      pcbY: "1.0001250000000255mm",
      width: "1.499997mm",
      height: "1.499997mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin46"],
      pcbX: "-20.939994949999914mm",
      pcbY: "0.00012700000002041634mm",
      width: "1.499997mm",
      height: "1.499997mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin1"],
      pcbX: "-24.07003695000003mm",
      pcbY: "-9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin40"],
      pcbX: "-24.07003695000003mm",
      pcbY: "9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin2"],
      pcbX: "-21.530036950000067mm",
      pcbY: "-9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin39"],
      pcbX: "-21.530036950000067mm",
      pcbY: "9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin3"],
      pcbX: "-18.99003694999999mm",
      pcbY: "-9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin38"],
      pcbX: "-18.99003694999999mm",
      pcbY: "9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin4"],
      pcbX: "-16.450036950000026mm",
      pcbY: "-9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin37"],
      pcbX: "-16.450036950000026mm",
      pcbY: "9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin5"],
      pcbX: "-13.910036950000062mm",
      pcbY: "-9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin36"],
      pcbX: "-13.910036950000062mm",
      pcbY: "9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin6"],
      pcbX: "-11.370036949999985mm",
      pcbY: "-9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin35"],
      pcbX: "-11.370036949999985mm",
      pcbY: "9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin7"],
      pcbX: "-8.830036950000022mm",
      pcbY: "-9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin34"],
      pcbX: "-8.830036950000022mm",
      pcbY: "9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin8"],
      pcbX: "-6.290036950000058mm",
      pcbY: "-9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin33"],
      pcbX: "-6.290036950000058mm",
      pcbY: "9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin9"],
      pcbX: "-3.7500369499999806mm",
      pcbY: "-9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin32"],
      pcbX: "-3.7500369499999806mm",
      pcbY: "9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin10"],
      pcbX: "-1.210036950000017mm",
      pcbY: "-9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin31"],
      pcbX: "-1.210036950000017mm",
      pcbY: "9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin11"],
      pcbX: "1.3299630499999466mm",
      pcbY: "-9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin30"],
      pcbX: "1.3299630499999466mm",
      pcbY: "9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin12"],
      pcbX: "3.869963050000024mm",
      pcbY: "-9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin29"],
      pcbX: "3.869963050000024mm",
      pcbY: "9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin13"],
      pcbX: "6.409963049999988mm",
      pcbY: "-9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin28"],
      pcbX: "6.409963049999988mm",
      pcbY: "9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin14"],
      pcbX: "8.949963049999951mm",
      pcbY: "-9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin27"],
      pcbX: "8.949963049999951mm",
      pcbY: "9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin15"],
      pcbX: "11.489963049999915mm",
      pcbY: "-9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin26"],
      pcbX: "11.489963049999915mm",
      pcbY: "9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin16"],
      pcbX: "14.029963049999992mm",
      pcbY: "-9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin25"],
      pcbX: "14.029963049999992mm",
      pcbY: "9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin17"],
      pcbX: "16.569963049999956mm",
      pcbY: "-9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin24"],
      pcbX: "16.569963049999956mm",
      pcbY: "9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin18"],
      pcbX: "19.10996304999992mm",
      pcbY: "-9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin23"],
      pcbX: "19.10996304999992mm",
      pcbY: "9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin19"],
      pcbX: "21.649963049999997mm",
      pcbY: "-9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin22"],
      pcbX: "21.649963049999997mm",
      pcbY: "9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin20"],
      pcbX: "24.18996304999996mm",
      pcbY: "-9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("smtpad", {
      portHints: ["pin21"],
      pcbX: "24.18996304999996mm",
      pcbY: "9.689973000000009mm",
      width: "1.5999967999999998mm",
      height: "3.1999935999999995mm",
      shape: "rect"
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": 17.601101449999874,
        "y": -10.499877399999946
      }, {
        "x": 18.078900849999968,
        "y": -10.499877399999946
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": 25.55998825000006,
        "y": 3.5711383999999953
      }, {
        "x": 25.55998825000006,
        "y": -3.5710622000000285
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": 25.22110144999988,
        "y": -10.499877399999946
      }, {
        "x": 25.55998825000006,
        "y": -10.499877399999946
      }, {
        "x": 25.55998825000006,
        "y": -3.5710622000000285
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": 25.55998825000006,
        "y": 3.5711383999999953
      }, {
        "x": 25.55998825000006,
        "y": 10.500080600000047
      }, {
        "x": 25.22110144999988,
        "y": 10.500080600000047
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": -25.101048350000042,
        "y": 10.499953600000026
      }, {
        "x": -25.439808149999976,
        "y": 10.499953600000026
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": -25.439935149999997,
        "y": 10.500080600000047
      }, {
        "x": -25.439935149999997,
        "y": -10.499877399999946
      }, {
        "x": -25.101099149999982,
        "y": -10.499877399999946
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": -26.739830950000055,
        "y": 3.9996363999999858
      }, {
        "x": -26.339603149999903,
        "y": 3.9996363999999858
      }, {
        "x": -26.339603149999903,
        "y": -4.000245999999834
      }, {
        "x": -26.739830950000055,
        "y": -4.000245999999834
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": -26.339603149999903,
        "y": -3.8089332000000695
      }, {
        "x": -25.465233549999994,
        "y": -3.8089332000000695
      }, {
        "x": -25.439808149999976,
        "y": -3.834358599999973
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": -26.339603149999903,
        "y": 3.8025069999999914
      }, {
        "x": -25.439808149999976,
        "y": 3.8025069999999914
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": -26.739830950000055,
        "y": 3.9996363999999858
      }, {
        "x": -26.739830950000055,
        "y": -4.000245999999834
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": -22.561099150000132,
        "y": 10.500080600000047
      }, {
        "x": -23.03889855,
        "y": 10.500080600000047
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": -20.021099150000055,
        "y": 10.500080600000047
      }, {
        "x": -20.498898550000035,
        "y": 10.500080600000047
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": -17.48109915000009,
        "y": 10.500080600000047
      }, {
        "x": -17.95889855000007,
        "y": 10.500080600000047
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": -14.941099150000014,
        "y": 10.500080600000047
      }, {
        "x": -15.418898550000108,
        "y": 10.500080600000047
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": -12.40109915000005,
        "y": 10.500080600000047
      }, {
        "x": -12.87889855000003,
        "y": 10.500080600000047
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": -9.861099150000086,
        "y": 10.500080600000047
      }, {
        "x": -10.338898550000067,
        "y": 10.500080600000047
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": -7.321099150000123,
        "y": 10.500080600000047
      }, {
        "x": -7.79889854999999,
        "y": 10.500080600000047
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": -4.7810991500000455,
        "y": 10.500080600000047
      }, {
        "x": -5.258898550000026,
        "y": 10.500080600000047
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": -2.241099150000082,
        "y": 10.500080600000047
      }, {
        "x": -2.7188985500000626,
        "y": 10.500080600000047
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": 0.29890084999999544,
        "y": 10.500080600000047
      }, {
        "x": -0.17889855000009902,
        "y": 10.500080600000047
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": 2.838900849999959,
        "y": 10.500080600000047
      }, {
        "x": 2.3611014499998646,
        "y": 10.500080600000047
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": 5.378900849999923,
        "y": 10.500080600000047
      }, {
        "x": 4.901101449999942,
        "y": 10.500080600000047
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": 7.918900849999886,
        "y": 10.500080600000047
      }, {
        "x": 7.441101450000019,
        "y": 10.500080600000047
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": 10.458900849999964,
        "y": 10.500080600000047
      }, {
        "x": 9.98110144999987,
        "y": 10.500080600000047
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": 12.998900849999927,
        "y": 10.500080600000047
      }, {
        "x": 12.521101449999946,
        "y": 10.500080600000047
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": 15.538900850000005,
        "y": 10.500080600000047
      }, {
        "x": 15.06110144999991,
        "y": 10.500080600000047
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": 18.078900849999968,
        "y": 10.500080600000047
      }, {
        "x": 17.601101449999874,
        "y": 10.500080600000047
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": 20.618900849999932,
        "y": 10.500080600000047
      }, {
        "x": 20.14110144999995,
        "y": 10.500080600000047
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": 23.158900849999895,
        "y": 10.500080600000047
      }, {
        "x": 22.68110145000003,
        "y": 10.500080600000047
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": 22.68110145000003,
        "y": -10.499877399999946
      }, {
        "x": 23.158900849999895,
        "y": -10.499877399999946
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": 20.14110144999995,
        "y": -10.499877399999946
      }, {
        "x": 20.618900849999932,
        "y": -10.499877399999946
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": 15.06110144999991,
        "y": -10.499877399999946
      }, {
        "x": 15.538900850000005,
        "y": -10.499877399999946
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": 12.521101449999946,
        "y": -10.499877399999946
      }, {
        "x": 12.998900849999927,
        "y": -10.499877399999946
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": 9.98110144999987,
        "y": -10.499877399999946
      }, {
        "x": 10.458900849999964,
        "y": -10.499877399999946
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": 7.441101450000019,
        "y": -10.499877399999946
      }, {
        "x": 7.918900849999886,
        "y": -10.499877399999946
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": 4.901101449999942,
        "y": -10.499877399999946
      }, {
        "x": 5.378900849999923,
        "y": -10.499877399999946
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": 2.3611014499998646,
        "y": -10.499877399999946
      }, {
        "x": 2.838900849999959,
        "y": -10.499877399999946
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": -0.17889855000009902,
        "y": -10.499877399999946
      }, {
        "x": 0.29890084999999544,
        "y": -10.499877399999946
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": -2.7188985500000626,
        "y": -10.499877399999946
      }, {
        "x": -2.241099150000082,
        "y": -10.499877399999946
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": -5.258898550000026,
        "y": -10.499877399999946
      }, {
        "x": -4.7810991500000455,
        "y": -10.499877399999946
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": -7.79889854999999,
        "y": -10.499877399999946
      }, {
        "x": -7.321099150000123,
        "y": -10.499877399999946
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": -10.338898550000067,
        "y": -10.499877399999946
      }, {
        "x": -9.861099150000086,
        "y": -10.499877399999946
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": -12.87889855000003,
        "y": -10.499877399999946
      }, {
        "x": -12.40109915000005,
        "y": -10.499877399999946
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": -15.418898550000108,
        "y": -10.499877399999946
      }, {
        "x": -14.941099150000014,
        "y": -10.499877399999946
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": -17.95889855000007,
        "y": -10.499877399999946
      }, {
        "x": -17.48109915000009,
        "y": -10.499877399999946
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": -20.498898550000035,
        "y": -10.499877399999946
      }, {
        "x": -20.021099150000055,
        "y": -10.499877399999946
      }]
    }), /*#__PURE__*/React.createElement("silkscreenpath", {
      route: [{
        "x": -23.03889855,
        "y": -10.499877399999946
      }, {
        "x": -22.561099150000132,
        "y": -10.499877399999946
      }]
    }))
  }));
};
const usePICO_W = core.createUseComponent(PICO_W, pinLabels);

// ToDO import from tscircuit utils in the future
function grid({
  rows,
  cols,
  xSpacing,
  ySpacing,
  width,
  height,
  offsetX = 0,
  offsetY = 0,
  yDirection = "cartesian"
}) {
  // Calculate cell dimensions
  const cellWidth = width ? width / cols : xSpacing ?? 1;
  const cellHeight = height ? height / rows : ySpacing ?? 1;
  const cells = [];
  for (let row = 0; row < rows; row++) {
    for (let col = 0; col < cols; col++) {
      const index = row * cols + col;

      // Calculate center position
      const centerX = offsetX + col * cellWidth + cellWidth / 2;
      const rawCenterY = offsetY + row * cellHeight + cellHeight / 2;

      // Adjust Y coordinate based on yDirection
      const centerY = yDirection === "cartesian" ? offsetY + (rows - 1 - row) * cellHeight + cellHeight / 2 : rawCenterY;
      cells.push({
        index,
        center: {
          x: centerX,
          y: centerY
        },
        topLeft: {
          x: centerX - cellWidth / 2,
          y: centerY + cellHeight / 2
        },
        bottomRight: {
          x: centerX + cellWidth / 2,
          y: centerY - cellHeight / 2
        }
      });
    }
  }
  return cells;
}
var index = () => {
  const U1 = usePICO_W("U1");
  return /*#__PURE__*/React.createElement("board", {
    width: "55mm",
    height: "52mm"
  }, /*#__PURE__*/React.createElement(U1, {
    pcbRotation: "90deg",
    pcbX: -15,
    pcbY: 0
  }), grid({
    cols: 3,
    rows: 5,
    xSpacing: 8,
    ySpacing: 5,
    offsetX: 3
  }).map(({
    center,
    index
  }) => {
    const ledName = `LED${index + 1}`;
    const prevLedName = index > 0 ? `LED${index}` : null;
    return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(WS2812B_2020, {
      schX: center.x / 2,
      schY: 5 + center.y / 2,
      name: ledName,
      pcbX: center.x,
      pcbY: center.y
    }), /*#__PURE__*/React.createElement("trace", {
      from: `.${ledName} .GND`,
      to: "net.GND"
    }), /*#__PURE__*/React.createElement("trace", {
      from: `.${ledName} .VDD`,
      to: "net.V5"
    }), prevLedName && /*#__PURE__*/React.createElement("trace", {
      from: `.${prevLedName} .DO`,
      to: `.${ledName} .DI`
    }));
  }), /*#__PURE__*/React.createElement("trace", {
    from: ".LED1 .DI",
    to: U1.GP6_SPI0SCK_I2C1SDA
  }), /*#__PURE__*/React.createElement("trace", {
    from: U1.GND1,
    to: "net.GND"
  }), /*#__PURE__*/React.createElement("trace", {
    from: U1.GND2,
    to: "net.GND"
  }), /*#__PURE__*/React.createElement("trace", {
    from: U1.GND3,
    to: "net.GND"
  }), /*#__PURE__*/React.createElement("trace", {
    from: U1.GND4,
    to: "net.GND"
  }), /*#__PURE__*/React.createElement("trace", {
    from: U1.GND5,
    to: "net.GND"
  }), /*#__PURE__*/React.createElement("trace", {
    from: U1.GND6,
    to: "net.GND"
  }), /*#__PURE__*/React.createElement("trace", {
    from: U1.GND7,
    to: "net.GND"
  }), /*#__PURE__*/React.createElement("trace", {
    from: U1.VBUS,
    to: "net.V5"
  }), /*#__PURE__*/React.createElement(WS2812B_2020, {
    name: "LED16",
    schX: 8
  }), /*#__PURE__*/React.createElement("trace", {
    from: `.LED16 .GND`,
    to: "net.GND"
  }), /*#__PURE__*/React.createElement("trace", {
    from: `.LED16 .VDD`,
    to: "net.V5"
  }), /*#__PURE__*/React.createElement("trace", {
    from: ".LED16 .DI",
    to: U1.GP10_SPI1SCK_I2C1SDA
  }));
};

module.exports = index;