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-keyboardIn 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.
src/Encoder.tsx
import * as React from 'react'
import type { Half } from './mechanicalGeometry'
import { geometryFor } from './mechanicalGeometry'
import { PEC11R_4215K_S0012 } from '../imports/PEC11R_4215K_S0012'
import { A_1N4148W } from '../imports/A_1N4148W'
/** Shaft anchor and rotation are locked to Sofle SW31. Bourns PEC11R-4215K-S0012,
* 15 mm knurled shaft; nominal footprint checked against Bourns PEC11R drawing. Hand-soldered.
*/
export function Encoder({half}:{half:Half}) {
const p=geometryFor(half).encoder
return <>
<schematicsection name="encoder" displayName="" sectionTitleFontSize={.4}/>
<PEC11R_4215K_S0012 name="ENC1"
pcbX={p.x} pcbY={p.y} pcbRotation={(p.rotation+270)%360} layer="top"
schX={0} schY={-14} schSectionName="encoder" schWidth={1.485} schHeight={.8}
connections={{pin3:'net.encoderA',pin5:'net.encoderB',pin4:'net.GND',pin1:'net.COL0',pin2:'net.KEY_ENCODER',pin6:'net.GND',pin7:'net.GND'}}/>
<A_1N4148W name="D_ENC" layer="bottom" pcbX={p.x+(half==='left'?-8:8)} pcbY={p.y-8}
schX={2.5} schY={-14} schSectionName="encoder" connections={{anode:'net.KEY_ENCODER',cathode:'net.ROW4'}}/>
</>
}