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/S4_3528RGBTA_A.tsx
import type { ChipProps } from "@tscircuit/props"
const pinLabels = {
pin1: ["B", "BLUE_CATHODE"],
pin2: ["A", "COMMON_ANODE"],
pin3: ["G", "GREEN_CATHODE"],
pin4: ["R", "RED_CATHODE"],
} as const
export const S4_3528RGBTA_A = (props: ChipProps<typeof pinLabels>) => {
return (
<chip
pinLabels={pinLabels}
supplierPartNumbers={{
"jlcpcb": [
"C2827321"
]
}}
manufacturerPartNumber="S4_3528RGBTA_A"
footprint={<footprint>
<smtpad portHints={["pin3"]} pcbX="1.500124mm" pcbY="0.750062mm" width="1.2999974mm" height="0.8999982mm" shape="rect" />
<smtpad portHints={["pin1"]} pcbX="-1.49987mm" pcbY="0.750062mm" width="1.2999974mm" height="0.8999982mm" shape="rect" />
<smtpad portHints={["pin2"]} pcbX="-1.500124mm" pcbY="-0.750062mm" width="1.2999974mm" height="0.8999982mm" shape="rect" />
<smtpad portHints={["pin4"]} pcbX="1.500124mm" pcbY="-0.750062mm" width="1.2999974mm" height="0.8999982mm" shape="rect" />
<silkscreenpath route={[{"x":2.158999999999992,"y":-1.3970253999998477},{"x":2.1592540000000326,"y":-2.0314919999998438},{"x":1.524253999999928,"y":-2.0314919999998438},{"x":2.1592540000000326,"y":-1.3964919999998529}]} />
<silkscreenpath route={[{"x":1.6000221999998985,"y":-1.330172599999969},{"x":1.6000221999998985,"y":-1.3999971999999161},{"x":-1.6000222000000122,"y":-1.3999971999999161},{"x":-1.6000222000000122,"y":-1.330172599999969}]} />
<silkscreenpath route={[{"x":-1.6000222000000122,"y":1.330121800000029},{"x":-1.6000222000000122,"y":1.3999464000000899}]} />
<silkscreenpath route={[{"x":-1.6000222000000122,"y":-0.1698751999998649},{"x":-1.6000222000000122,"y":0.16982440000003862}]} />
<silkscreenpath route={[{"x":1.6000221999998985,"y":0.16982440000003862},{"x":1.6000221999998985,"y":-0.1698751999998649}]} />
<silkscreenpath route={[{"x":-1.6000222000000122,"y":1.3999464000000899},{"x":1.6000221999998985,"y":1.3999464000000899},{"x":1.6000221999998985,"y":1.330121800000029}]} />
<silkscreenpath route={[{"x":0.7089139999999361,"y":0},{"x":0.6854420735875237,"y":-0.1782869815807544},{"x":0.6166258673461016,"y":-0.3444240000001173},{"x":0.5071550920067693,"y":-0.4870890920068405},{"x":0.36449000000004617,"y":-0.5965598673461727},{"x":0.19835298158068326,"y":-0.6653760735875949},{"x":0.02006600000004255,"y":-0.6888480000000072},{"x":-0.15822098158071185,"y":-0.6653760735875949},{"x":-0.32435800000007475,"y":-0.5965598673461727},{"x":-0.4670230920069116,"y":-0.4870890920068405},{"x":-0.5764938673461302,"y":-0.3444240000001173},{"x":-0.6453100735875523,"y":-0.1782869815807544},{"x":-0.6687820000000784,"y":0},{"x":-0.6453100735875523,"y":0.1782869815808681},{"x":-0.5764938673461302,"y":0.3444240000001173},{"x":-0.4670230920069116,"y":0.4870890920068405},{"x":-0.32435800000007475,"y":0.596559867346059},{"x":-0.15822098158071185,"y":0.6653760735874812},{"x":0.02006600000004255,"y":0.6888480000000072},{"x":0.19835298158068326,"y":0.6653760735874812},{"x":0.36449000000004617,"y":0.596559867346059},{"x":0.5071550920067693,"y":0.4870890920068405},{"x":0.6166258673461016,"y":0.3444240000001173},{"x":0.6854420735875237,"y":0.1782869815808681},{"x":0.7089139999999361,"y":0}]} />
<silkscreentext text="{NAME}" pcbX="0.010414mm" pcbY="2.420368mm" anchorAlignment="center" fontSize="1mm" />
<courtyardoutline outline={[{"x":-2.398586000000023,"y":1.6703680000000531},{"x":2.4194139999999607,"y":1.6703680000000531},{"x":2.4194139999999607,"y":-2.2840320000000247},{"x":-2.398586000000023,"y":-2.2840320000000247},{"x":-2.398586000000023,"y":1.6703680000000531}]} />
</footprint>}
cadModel={{
objUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C2827321.obj?uuid=411dcfee076c429db3e8beff97994e17",
stepUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C2827321.step?uuid=411dcfee076c429db3e8beff97994e17",
pcbRotationOffset: 0,
modelOriginPosition: { x: -0.000012699999956566899, y: 0.000025399999913133797, z: -1 },
}}
{...props}
/>
)
}