jbreidfjord-dev / NOT Gate

Files

Pins

Symbol

PCB

Open in Flux
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
const inputTerminalUid = "fd1689fa-27b8-5542-55e4-b8d50056031e";
const outputTerminalUid = "52fcede5-1d94-0320-3fbf-6d55d792faf5";
const inputTerminal = flux.getNodeById(inputTerminalUid, "elementTerminal");
const outputTerminal = flux.getNodeById(outputTerminalUid, "elementTerminal");
if (!inputTerminal || !outputTerminal) {
    throw new Error("Oops! Couldn't find terminals");
}
flux.on("setup", () => {
    const highVoltage = Number(flux.properties.find((prop) => prop.name === "High Voltage")?.value ?? 5);
    flux.simulationModel = {
        type: "inverter",
        highVoltage,
        slewRate: 0,
        map_input_to_terminal_uid: inputTerminalUid,
        map_output_to_terminal_uid: outputTerminalUid,
    }
});
Enter to Rename, Shift+Enter to Preview

Reviews