inductance()

[Simulation]
void inductance(unsigned short pin_from, unsigned short pin_to, float inductance);

Description

Creates an inductance between the specified pins.

Parameters

pin_from: the Custom Element pin where the inductance starts.

pin_to: the Custom Element pin where the inductance ends.

inductance: the inductance value in henries.

Returns

Nothing.

Example Code

The code creates an inductance of 1mH between the pins 3 and 4.

void setup() {
    pinLabel(3, "IN");   // sets the pin 3 label to "IN" (input by default)
    pinLabel(4, "OUT");  // sets the pin 4 label to "OUT" (input by default)
    
    inductance(3, 4, 0.001);  // creates an inductance of 1mH between the pins 3 and 4
}

void loop() {
}

Notes and Warnings

  • The inductance() function can be used with all the pins, even for the power and ground pins.
  • The inductance value must be greater than 0 F.
  • The inductance() function can only be set during the setup, and won’t change the pin mode, so be careful when using it with the pins defined as outputs.
  • Any call to inductance() during the loop will be ignored.