mohan-bee/light-controller

This code defines the hardware sections and symbols for a PCB involving USB power, voltage regulation, ESP12F module, RGB outputs, I2C sensors, and debug points, along with rendering labels for test points.

Version
1.0.30
License
unset
Stars
2

Use with the tscircuit CLI

tsci is the tscircuit CLI. Install it with npm install -g tscircuit.

tsci clone mohan-bee/light-controller  # download the package files into ./light-controller
tsci add mohan-bee/light-controller    # add it to your project as @tsci/mohan-bee.light-controller

In a cloned or new (tsci init) project: tsci dev starts a local preview, tsci build outputs Circuit JSON, and tsci push publishes to tscircuit.com.

imports/RVE10V470M6X8.tsx

import type { ChipProps } from "@tscircuit/props"

const pinLabels = {
  pin1: ["pin1"],
  pin2: ["pin2"]
} as const

export const RVE10V470M6X8 = (props: ChipProps<typeof pinLabels>) => {
  return (
    <chip
      pinLabels={pinLabels}
      symbol={
        <symbol>
          <schematicpath points={[{"x":-1.778,"y":1.778},{"x":-1.778,"y":-1.778}]} strokeWidth={0.254} strokeColor="#880000" />
          <port name="pin1" pinNumber={1} aliases={["1"]} direction="left" schX={-6.35} schY={0} schStemLength={2.54} />
          <port name="pin2" pinNumber={2} aliases={["2"]} direction="right" schX={3.81} schY={0} schStemLength={2.54} />
          <schematicpath points={[{"x":-3.81,"y":0},{"x":-1.778,"y":0}]} strokeWidth={0.254} strokeColor="#880000" />
          <schematicpath points={[{"x":-0.762,"y":0},{"x":1.27,"y":0}]} strokeWidth={0.254} strokeColor="#880000" />
          <schematicpath svgPath="M -0.14224 -1.7526 A 2.54 2.54 0 0 0 -0.11938 1.78562" strokeWidth={0.254} strokeColor="#880000" />
          <schematicpath points={[{"x":-3.556,"y":1.27},{"x":-2.54,"y":1.27}]} strokeWidth={0.254} strokeColor="#880000" />
          <schematicpath points={[{"x":-3.048,"y":1.778},{"x":-3.048,"y":0.762}]} strokeWidth={0.254} strokeColor="#880000" />
        </symbol>
      }
      supplierPartNumbers={{
  "jlcpcb": [
    "C48971004"
  ]
}}
      manufacturerPartNumber="RVE10V470M6X8"
      footprint={<footprint>
        <smtpad portHints={["pin1"]} pcbX="-2.669921mm" pcbY="0mm" width="3.499993mm" height="1.1999976mm" shape="rect" />
<smtpad portHints={["pin2"]} pcbX="2.669921mm" pcbY="0mm" width="3.499993mm" height="1.1999976mm" shape="rect" />
<silkscreenpath route={[{"x":3.3555431999999428,"y":-0.7393432000001212},{"x":3.3756345999998985,"y":-3.375710799999979},{"x":-1.981250799999998,"y":-3.375710799999979},{"x":-3.3757107999998652,"y":-1.9812508000001117},{"x":-3.3623757999998816,"y":-0.6858254000001125}]} />
<silkscreenpath route={[{"x":3.3694370000000617,"y":0.707644000000073},{"x":3.376142600000094,"y":3.3761171999999533},{"x":-1.980056999999988,"y":3.3761171999999533},{"x":-3.37619339999992,"y":1.9799807999999075},{"x":-3.37619339999992,"y":0.6857491999999183}]} />
<silkscreentext text="{NAME}" pcbX="-0.008763mm" pcbY="4.374644mm" anchorAlignment="center" fontSize="1mm" />
<courtyardoutline outline={[{"x":-4.678362999999877,"y":3.6246439999999893},{"x":4.660837000000242,"y":3.6246439999999893},{"x":4.660837000000242,"y":-3.6317559999999958},{"x":-4.678362999999877,"y":-3.6317559999999958},{"x":-4.678362999999877,"y":3.6246439999999893}]} />
      </footprint>}
      cadModel={{
        objUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C48971004.obj?uuid=19c047b38b814d5099587d6a780dd6ee",
        stepUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C48971004.step?uuid=19c047b38b814d5099587d6a780dd6ee",
        pcbRotationOffset: 180,
        modelOriginPosition: { x: -0.0001015999999935957, y: -0.0001778000000740576, z: -0.02 },
      }}
      {...props}
    />
  )
}