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-controllerIn 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/K8_7071D_L1.tsx
import type { SwitchProps } from "@tscircuit/props"
const pinLabels = {
pin1: ["pin1"],
pin2: ["pin2"],
pin3: ["pin3"],
pin4: ["pin4"],
pin5: ["pin5"],
pin6: ["pin6"]
} as const
export const K8_7071D_L1 = (props: SwitchProps) => {
const { name = "SW1", ...restProps } = props
return (
<switch
name={name}
pinLabels={pinLabels}
supplierPartNumbers={{
"jlcpcb": [
"C111759"
]
}}
manufacturerPartNumber="K8_7071D_L1"
footprint={<footprint>
<platedhole portHints={["pin4"]} pcbX="-1.999996mm" pcbY="2.499995mm" outerDiameter="1.7999964mm" holeDiameter="1.1999976mm" shape="circle" />
<platedhole portHints={["pin5"]} pcbX="-0mm" pcbY="2.499995mm" outerDiameter="1.7999964mm" holeDiameter="1.1999976mm" shape="circle" />
<platedhole portHints={["pin6"]} pcbX="1.999996mm" pcbY="2.499995mm" outerDiameter="1.7999964mm" holeDiameter="1.1999976mm" shape="circle" />
<platedhole portHints={["pin3"]} pcbX="1.999996mm" pcbY="-2.499995mm" outerDiameter="1.7999964mm" holeDiameter="1.1000232mm" shape="circle" />
<platedhole portHints={["pin2"]} pcbX="-0mm" pcbY="-2.499995mm" outerDiameter="1.7999964mm" holeDiameter="1.1999976mm" shape="circle" />
<platedhole portHints={["pin1"]} pcbX="-1.999996mm" pcbY="-2.499995mm" outerDiameter="1.7999964mm" holeDiameter="1.1999976mm" shape="circle" />
<silkscreenpath route={[{"x":-3.6042600000000675,"y":3.5510470000000396},{"x":3.395725999999968,"y":3.5510470000000396},{"x":3.395725999999968,"y":-3.4489644000000226},{"x":-3.6042600000000675,"y":-3.4489644000000226},{"x":-3.6042600000000675,"y":3.450971000000095}]} />
<silkscreentext text="{NAME}" pcbX="-0.044196mm" pcbY="4.545205mm" anchorAlignment="center" fontSize="1mm" />
<courtyardoutline outline={[{"x":-3.85019600000021,"y":3.7952050000001236},{"x":3.7618039999997563,"y":3.7952050000001236},{"x":3.7618039999997563,"y":-3.791394999999966},{"x":-3.85019600000021,"y":-3.791394999999966},{"x":-3.85019600000021,"y":3.7952050000001236}]} />
</footprint>}
cadModel={{
objUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C111759.obj?uuid=cc8e161f59e248e5a07858d8e8ab64cd",
stepUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C111759.step?uuid=cc8e161f59e248e5a07858d8e8ab64cd",
pcbRotationOffset: 0,
modelOriginPosition: { x: 0, y: -0.0049873000000433265, z: -0.000006999999999646178 },
}}
{...restProps}
/>
)
}