capacitance()
[Simulation]
void capacitance(unsigned short pin_from, unsigned short pin_to, float capacitance);Description
Creates a capacitance between the specified pins.
Parameters
pin_from: the Custom Element pin where the capacitance
starts.
pin_to: the Custom Element pin where the capacitance
ends.
capacitance: the capacitance value in farads.
Returns
Nothing.
Example Code
The code creates a capacitance of 1uF 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)
capacitance(3, 4, 0.000001); // creates a capacitance of 1uF between the pins 3 and 4
}
void loop() {
}Notes and Warnings
- The
capacitance()function can be used with all the pins, even for the power and ground pins. - The capacitance value must be greater than 0 F.
- The
capacitance()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
capacitance()during the loop will be ignored.
