Class DigitalOutput
Represents an operator that writes the sequence of digital state transitions to the specified Arduino output pin.
public class DigitalOutput : Sink<bool>
- Inheritance
-
DigitalOutput
- Inherited Members
Properties
Pin
Gets or sets the digital output pin number on which to write the state values.
public int Pin { get; set; }
Property Value
PortName
Gets or sets the name of the serial port used to communicate with the Arduino.
[TypeConverter(typeof(PortNameConverter))]
public string PortName { get; set; }
Property Value
Methods
Process(IObservable<bool>)
Writes a sequence of binary states to the specified Arduino digital output pin.
public override IObservable<bool> Process(IObservable<bool> source)
Parameters
source
IObservable<bool>A sequence of bool values used to update the state of the specified Arduino output pin. If a value in the sequence is true, the pin will be set to HIGH; otherwise, the pin will be set to LOW.
Returns
- IObservable<bool>
A sequence of the bool values which have been written into the Arduino output pin.
Remarks
This operator only subscribes to the source
sequence after
initializing the connection to the Arduino and configuring the digital pin mode
to OUTPUT.