mohan-bee/drone

This code defines the physical hardware layout and component placements for a drone's circuit board, including outlines, cutouts, and detailed PCB footprints for various electronic components like microcontrollers, sensors, connectors, and passive devices.

Version
1.0.11
License
unset
Stars
0

index.circuit.tsx

PCBPCB preview for index.circuit.tsx
SchematicSchematic preview for index.circuit.tsx
import { Fragment } from "react"
import {
  droneBoardCutouts,
  droneBoardOutline,
} from "./board/DroneFrameGeometry"
import { ChargerSection } from "./sections/ChargerSection"
import { ControllerSection } from "./sections/ControllerSection"
import { DebugLedsSection } from "./sections/DebugLedsSection"
import { ImuExpansionSection } from "./sections/ImuExpansionSection"
import { MotorDriversSection } from "./sections/MotorDriversSection"
import { OnOffSection } from "./sections/OnOffSection"
import { PowerSection } from "./sections/PowerSection"
import { UsbUartSection } from "./sections/UsbUartSection"

export default () => (
  <board
    outline={droneBoardOutline}
    autorouter={{ allowViaInPad: true }}
    isViaInPadAllowed
    schAutoLayoutEnabled
    schTraceAutoLabelEnabled
    schMaxTraceDistance="8mm"
  >
    {droneBoardCutouts.map((points, index) => (
      <Fragment key={`drone-frame-cutout-${index + 1}`}>
        <cutout
          name={`CUTOUT${index + 1}`}
          shape="polygon"
          points={points}
        />
      </Fragment>
    ))}
    <PowerSection />
    <OnOffSection />
    <ChargerSection />
    <UsbUartSection />
    <ControllerSection />
    <ImuExpansionSection />
    <MotorDriversSection />
    <DebugLedsSection />
  </board>
)