rushabhcodes/tetris
This code defines various electronic component models—including a AAA battery holder, ATtiny85 microcontroller, switch, buzzer, display, and resistors—as hardware modules with detailed footprints, pin configurations, CAD models, and physical specifications for use in circuit design.
- Version
- 1.0.2
- License
- MIT
- Stars
- 2
imports/BUTTON.tsx
import type { ChipProps } from "@tscircuit/props";
const pinLabels = {
pin1: ["pin1"],
pin2: ["pin2"],
pin3: ["pin3"],
pin4: ["pin4"],
} as const;
export const BUTTON = (props: ChipProps<typeof pinLabels>) => {
return (
<chip
pinLabels={pinLabels}
supplierPartNumbers={{
jlcpcb: ["C87495"],
}}
schPinArrangement={{
bottomSide: ["pin2", "pin1"],
topSide: ["pin4", "pin3"],
}}
manufacturerPartNumber="B3F_1055"
footprint={
<footprint>
<platedhole
portHints={["pin4"]}
pcbX="-3.249930000000063mm"
pcbY="2.249932000000058mm"
outerDiameter="1.9999959999999999mm"
holeDiameter="1.199896mm"
shape="circle"
/>
<platedhole
portHints={["pin3"]}
pcbX="3.2499299999999494mm"
pcbY="2.249932000000058mm"
outerDiameter="1.9999959999999999mm"
holeDiameter="1.199896mm"
shape="circle"
/>
<platedhole
portHints={["pin2"]}
pcbX="3.2499299999999494mm"
pcbY="-2.2499319999999443mm"
outerDiameter="1.9999959999999999mm"
holeDiameter="1.199896mm"
shape="circle"
/>
<platedhole
portHints={["pin1"]}
pcbX="-3.249930000000063mm"
pcbY="-2.2499319999999443mm"
outerDiameter="1.9999959999999999mm"
holeDiameter="1.199896mm"
shape="circle"
/>
<silkscreenpath
route={[
{ x: -2.2753066000000217, y: 3.001263999999992 },
{ x: 2.275306599999908, y: 3.001263999999992 },
]}
/>
<silkscreenpath
route={[
{ x: 2.8968699999999217, y: 1.0706099999999878 },
{ x: 2.8968699999999217, y: -1.0706099999999878 },
]}
/>
<silkscreenpath
route={[
{ x: 2.2033991999999216, y: -2.8976319999999305 },
{ x: -2.203399200000149, y: -2.8976319999999305 },
]}
/>
<silkscreenpath
route={[
{ x: -2.901696000000129, y: -1.0691875999999638 },
{ x: -2.901696000000129, y: 1.0691875999999638 },
]}
/>
</footprint>
}
cadModel={{
objUrl:
"https://modelcdn.tscircuit.com/easyeda_models/download?uuid=715e525e56634bc4b0accaf902208a03&pn=C87495",
rotationOffset: { x: 0, y: 0, z: 0 },
positionOffset: { x: -1.1368683772161603e-13, y: 0, z: 0 },
}}
{...props}
/>
);
};