salida digital#
Inicializando la clase digital_out#
Una salida digital se crea utilizando el siguiente constructor:
The digital_out constructor creates a digital_out object in the specified Three Wire Port:
Parámetro |
Descripción |
|---|---|
|
The 3-Wire Port that the Digital Output is connected to, whether it’s a port on the |
A Brain or 3-Wire Expander must be created first before they can be used to create an object with the digital_out Class constructor.
// Create the Brain.
brain Brain;
// Construct a Digital Input "digin" with the
// digital_out class.
digital_out digout = digital_out(Brain.ThreeWirePort.A);
This digout object will be used in all subsequent examples throughout this API documentation when referring to digital_out class methods.
Métodos de clase#
set()#
The set(value) command sets the value of the Digital Output.
Parámetros |
Descripción |
|---|---|
|
The value to set for the digital output: |
Devoluciones: Ninguna.
// Set the Digital Output to true.
digout.set(true);