Top-Level Design Entity#
The Design type is the top-level entry for a printed circuit board design. This type serves two purposes:
Holding container for the Board, Substrate, and the main Circuit entrypoint of the design, as well as others.
A marker for finding available designs within a JITX Python project.
Design Level Characteristics#
In addition to the required, Board, Substrate, and Circuit instance, you can also attach additional attributes to the Design object that control design wide features of a design. For
example, we can control the default resistor query parameters:
class StepperMotorController(Design):
substrate = SampleSubstrate()
board = SampleBoard()
circuit = StepperMotorCircuit()
resistor_defaults = ResistorQuery(case="0402", tolerance=0.01)
This will cause all resistor selections queried from the parts database to add these parameters by default. These defaults can of course be overridden with arguments to the query request.
Building a Design#
For example, the following command can be used to find all Design objects within a project:
(.venv) ➜ $> python -m jitx find
designs:
motor_controller.main.StepperMotorController
motor_controller.main.ServoMotorController
Here the find command discovers two Design objects named StepperMotorController and ServoMotorController in the file main.py.
These named objects can then be used to build the design with the following command:
(.venv) ➜ $> python -m jitx build --port <PORT> motor_controller.main.StepperMotorController
Where <PORT> is the TCP/IP port for connecting to the JITX backend. Typically you would not need to
invoke this command in the terminal because you could use the F5 key to launch the design from the IDE. The .vscode/launch.json file provides a way to customize this launch process. See VSCode’s documentation about launch.json for more info.