// Howdy ๐.
//
// If you are new to writing code in Flux make sure to check out our get started docs: https://docs.flux.ai/write-code
//
// We also have a Flux Slack Community in case you need help: https://join.slack.com/t/fluxcommunity/shared_invite/zt-p48n941f-wzQ06kGmuFJ2HXnGYT1JkA
//
// To infinity and beyond ๐
const invertingInputTerminal = flux.getNodeById("5f5e9e42-3eb2-5c3b-22f8-9c78410cc972"); //inv_in
const noninvertingInputTerminal = flux.getNodeById("a7548798-cd6c-9948-dff4-7967990bad4e"); //non_inv_in
const outputTerminal = flux.getNodeById("ddd3db6a-b44b-54b9-f4b0-c80031ee4eb5"); //out
const invertingInputVoltage = flux.createOutputNode("inv-voltage");
const noninvertingInputVoltage = flux.createOutputNode("non-inv-voltage");
const outputVoltage = flux.createOutputNode("out-voltage");
flux.on("setup", () => {
// The resistance of virtually every digital voltmeter is standardized at 10 megohms.
// The idea is the circuit should not "see" the meter. Almost no current flows through the meter.
const resistance = 10000000;
flux.simulationModel = {
type: "resistor",
resistance: resistance,
map_input_to_terminal_uid: anodeTerminal?.uid,
map_output_to_terminal_uid: cathodeTerminal?.uid,
}
});