digital_out#
Initializing the digital_out Class#
A Digital Output is created by using the following constructor:
The digital_out constructor creates a digital_out object in the specified Three Wire Port:
Parameter |
Description |
|---|---|
|
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.
Class Methods#
set()#
The set(value) command sets the value of the Digital Output.
Parameters |
Description |
|---|---|
|
The value to set for the digital output: |
Returns: None.
// Set the Digital Output to true.
digout.set(true);