krishnax12/usb-c-control-dial
USB-C control dial PCB with an EC11 push encoder and a 16-LED ring for volume and brightness controls. Work in progress; firmware not included and not fabrication-ready.
- Version
- 0.0.3
- License
- unset
- Stars
- 1
components/board-outline.ts
import { applyToPoint, rotateDEG } from "transformation-matrix"
export const boardRadius = 40
const outlineSegmentCount = 128
// At this radius, 128 segments stay within 0.013 mm of the ideal circle.
export const boardOutline = Array.from(
{ length: outlineSegmentCount },
(_, index) =>
applyToPoint(rotateDEG((360 * index) / outlineSegmentCount), {
x: boardRadius,
y: 0,
}),
)