powerPin()

[Circuit Interface]
void powerPin(unsigned short pin);

Description

Configures a specific pin to act as the ground connection for power.

It is necessary to define the power pin for the Custom Element to work correctly.

Parameters

pin: the Custom Element pin to set as power or VCC/VDD.

Returns

Nothing.

Example Code

The code defines the digital pin 10 and sets it as the power pin.

void setup() {
   powerPin(10);
}

void loop() {}

Notes and Warnings

Any pin can be defined as power, except the ground pin and those previously defined as output pins.