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/SWITCH.tsx

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

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

export const SWITCH = (props: ChipProps<typeof pinLabels>) => {
	return (
		<chip
			pinLabels={pinLabels}
			supplierPartNumbers={{
				jlcpcb: ["C160880"],
			}}
			schHeight={0.4}
			schWidth={0.4}
			schPinArrangement={{
				topSide: ["pin1"],
				rightSide: ["pin3"],
				leftSide: ["pin2"],
			}}
			manufacturerPartNumber="SSSS912500"
			footprint={
				<footprint>
					<platedhole
						portHints={["pin1"]}
						pcbX="-1.99999600000001mm"
						pcbY="0mm"
						outerDiameter="1.524mm"
						holeDiameter="0.9144mm"
						shape="circle"
					/>
					<platedhole
						portHints={["pin2"]}
						pcbX="0mm"
						pcbY="0mm"
						outerDiameter="1.524mm"
						holeDiameter="0.9144mm"
						shape="circle"
					/>
					<platedhole
						portHints={["pin3"]}
						pcbX="1.9999959999998964mm"
						pcbY="0mm"
						outerDiameter="1.524mm"
						holeDiameter="0.9144mm"
						shape="circle"
					/>
					<silkscreenpath
						route={[
							{ x: -5.800013799999988, y: 2.3500080000001162 },
							{ x: 5.800013799999988, y: 2.3499826000000894 },
						]}
					/>
					<silkscreenpath
						route={[
							{ x: 5.800013799999988, y: 2.3500080000001162 },
							{ x: 5.800013799999988, y: -2.3500080000000025 },
						]}
					/>
					<silkscreenpath
						route={[
							{ x: 5.800013799999988, y: -2.3500080000000025 },
							{ x: -5.800013799999988, y: -2.3500080000000025 },
						]}
					/>
					<silkscreenpath
						route={[
							{ x: -5.800013799999988, y: -2.3500080000000025 },
							{ x: -5.800013799999988, y: 2.3499826000000894 },
						]}
					/>
					<silkscreenpath
						route={[
							{ x: -0.4999990000001162, y: -0.999998000000005 },
							{ x: -2.4999950000001263, y: -0.999998000000005 },
						]}
					/>
					<silkscreenpath
						route={[
							{ x: -2.4999950000001263, y: 0.999998000000005 },
							{ x: -0.4999990000001162, y: 0.999998000000005 },
						]}
					/>
					<silkscreenpath
						route={[
							{ x: -0.4999990000001162, y: 0.999998000000005 },
							{ x: -0.4999990000001162, y: 0.8577071999999362 },
						]}
					/>
					<silkscreenpath
						route={[
							{ x: -0.4999990000001162, y: -0.8577072000000499 },
							{ x: -0.4999990000001162, y: -0.999998000000005 },
						]}
					/>
					<silkscreenpath
						route={[
							{ x: -2.4999950000001263, y: 0.999998000000005 },
							{ x: -2.4999950000001263, y: 0.8577071999999362 },
						]}
					/>
					<silkscreenpath
						route={[
							{ x: -2.4999950000001263, y: -0.8577072000000499 },
							{ x: -2.4999950000001263, y: -0.999998000000005 },
						]}
					/>
				</footprint>
			}
			cadModel={{
				objUrl:
					"https://modelcdn.tscircuit.com/easyeda_models/download?uuid=6730c252fac542cebcead752125e0897&pn=C160880",
				rotationOffset: { x: 0, y: 0, z: 0 },
				positionOffset: { x: 0, y: 0, z: 5 },
			}}
			{...props}
		/>
	);
};