rushabhcodes/wireless-split-keyboard

Wireless Split Keyboard — custom routed nRF52840 split PCBs with a printable enclosure

Version
0.4.5
License
unset
Stars
0

Use with the tscircuit CLI

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

tsci clone rushabhcodes/wireless-split-keyboard  # download the package files into ./wireless-split-keyboard
tsci add rushabhcodes/wireless-split-keyboard    # add it to your project as @tsci/rushabhcodes.wireless-split-keyboard

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

import * as React from 'react'
import type { ChipProps } from "@tscircuit/props"

const pinLabels = {
  pin6: ["pin6"],
  pin7: ["pin7"],
  pin8: ["A"],
  pin9: ["C"],
  pin10: ["B"],
  pin11: ["D","S1"],
  pin12: ["E","S2"]
} as const

export const EC11E15244B2 = (props: ChipProps<typeof pinLabels>) => {
  return (
    <chip
      pinLabels={pinLabels}
      symbol={
        <symbol>
          <port name="pin7" pinNumber={7} aliases={["7"]} direction="left" schX={-0.6} schY={0} schStemLength={0.26} />
          <port name="pin6" pinNumber={6} aliases={["6"]} direction="right" schX={0.6} schY={0} schStemLength={0.26} />
          <port name="pin12" pinNumber={12} aliases={["E"]} direction="up" schX={0.2} schY={0.6} schStemLength={0.2} />
          <port name="pin11" pinNumber={11} aliases={["D"]} direction="up" schX={-0.2} schY={0.6} schStemLength={0.2} />
          <port name="pin9" pinNumber={9} aliases={["C"]} direction="down" schX={0} schY={-0.6} schStemLength={0.2} />
          <port name="pin10" pinNumber={10} aliases={["B"]} direction="down" schX={0.2} schY={-0.6} schStemLength={0.2} />
          <port name="pin8" pinNumber={8} aliases={["A"]} direction="down" schX={-0.2} schY={-0.6} schStemLength={0.2} />
          <schematicpath points={[{"x":0.2,"y":0.3},{"x":0.2,"y":0.4}]} strokeColor="#880000" />
          <schematicpath points={[{"x":-0.2,"y":0.3},{"x":-0.2,"y":0.4}]} strokeColor="#880000" />
          <schematicpath points={[{"x":0.2,"y":-0.26},{"x":0.2,"y":-0.4}]} strokeColor="#880000" />
          <schematicpath points={[{"x":0,"y":-0.26},{"x":0,"y":-0.4}]} strokeColor="#880000" />
          <schematicpath points={[{"x":-0.2,"y":-0.26},{"x":-0.2,"y":-0.4},{"x":-0.2,"y":-0.4}]} strokeColor="#880000" />
          <schematiccircle center={{ x: 0, y: 0.02 }} radius={0.23} strokeWidth={0.02} color="#880000" />
          <schematicpath points={[{"x":-0.34,"y":-0.34},{"x":-0.28,"y":-0.34},{"x":-0.26,"y":-0.34},{"x":-0.26,"y":-0.26},{"x":0.26,"y":-0.26},{"x":0.26,"y":-0.34},{"x":0.34,"y":-0.34},{"x":0.34,"y":0.38},{"x":0.26,"y":0.38},{"x":0.26,"y":0.3},{"x":-0.26,"y":0.3},{"x":-0.26,"y":0.38},{"x":-0.34,"y":0.38},{"x":-0.34,"y":-0.34}]} strokeColor="#880000" />
          <schematictext schX={0} schY={0.84} text="{NAME}" fontSize={0.2} anchor="bottom_center" />
        </symbol>
      }
      supplierPartNumbers={{
  "jlcpcb": [
    "C470754"
  ]
}}
      manufacturerPartNumber="EC11E15244B2"
      footprint={<footprint>
        {/* Corrected to Alps' mounting-side drawing: 5 mm terminal pitch span,
            A/C/B 7.5 mm below shaft, D/E 5 mm above; imported catalog footprint
            instead used 2.54 mm spacing and 14.5 mm row separation. */}
        <platedhole portHints={['pin8']} pcbX={-2.5} pcbY={-7.5} outerDiameter={1.8} holeDiameter={1.1} shape="circle"/>
        <platedhole portHints={['pin9']} pcbX={0} pcbY={-7.5} outerDiameter={1.8} holeDiameter={1.1} shape="circle"/>
        <platedhole portHints={['pin10']} pcbX={2.5} pcbY={-7.5} outerDiameter={1.8} holeDiameter={1.1} shape="circle"/>
        <platedhole portHints={['pin11']} pcbX={-2.5} pcbY={5} outerDiameter={1.8} holeDiameter={1.1} shape="circle"/>
        <platedhole portHints={['pin12']} pcbX={2.5} pcbY={5} outerDiameter={1.8} holeDiameter={1.1} shape="circle"/>
        <platedhole portHints={['pin6']} pcbX={5.5} pcbY={0} holeWidth={1.5} holeHeight={2.8} outerWidth={2.1} outerHeight={3.4} shape="pill"/>
        <platedhole portHints={['pin7']} pcbX={-5.5} pcbY={0} holeWidth={1.5} holeHeight={2.8} outerWidth={2.1} outerHeight={3.4} shape="pill"/>
        <silkscreentext text="{NAME}" pcbX={0} pcbY={-6.6} fontSize={.8} layer="bottom"/>
      </footprint>}
      cadModel={{
        objUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C470754.obj?uuid=98040a81456e4e72ba6314de5f862cda",
        stepUrl: "https://modelcdn.tscircuit.com/easyeda_models/assets/C470754.step?uuid=98040a81456e4e72ba6314de5f862cda",
        pcbRotationOffset: 0,
        modelOriginPosition: { x: 0.000012700000070253736, y: -0.24998729999992975, z: -0.000006999999999646178 },
      }}
      {...props}
    />
  )
}