RCKit
Public Member Functions | List of all members
DigitalSetter Class Reference

Setter class that sets its value to an analog output pin. More...

#include <DigitalSetter.h>

Inheritance diagram for DigitalSetter:
Inheritance graph
[legend]
Collaboration diagram for DigitalSetter:
Collaboration graph
[legend]

Public Member Functions

 DigitalSetter (uint8_t pin)
 
void setPin (uint8_t pin)
 
virtual void input (int value)
 
virtual void failsafe ()
 Called when the source of input data is lost, and the Setter is required to fail in a safe way.
 
- Public Member Functions inherited from Setter
 Setter ()
 Constructor. More...
 
 Setter (Setter *target)
 Constructor with setting the target.
 
virtual void setTarget (Setter *target)
 
void setFailsafeValue (int failsafeValue)
 Sets the failsafeValue.
 
int failsafeValue ()
 

Additional Inherited Members

- Protected Attributes inherited from Setter
Setter_target
 This is the instance of Setter that will be given the transfotmed output value.
 
int _failsafeValue
 

Detailed Description

Setter class that sets its value to an analog output pin.

Author
Mike McCauley (mikem.nosp@m.@air.nosp@m.spayc.nosp@m.e.co.nosp@m.m)

Constructor & Destructor Documentation

◆ DigitalSetter()

DigitalSetter::DigitalSetter ( uint8_t  pin)
Parameters
[in]pinThe pin number of the digital output to set Caller is expected to have set it as an output already
Author
Mike McCauley (mikem.nosp@m.@air.nosp@m.spayc.nosp@m.e.co.nosp@m.m)

References setPin().

Member Function Documentation

◆ input()

void DigitalSetter::input ( int  value)
virtual

Input the value to be used to set the analog output Digital outputs are 0 or 1 Inout 0 produces digital output of 0. All other values produce output of 1

Parameters
[in]valueThe input 0 for off, all other values for on

Reimplemented from Setter.

Referenced by failsafe().

◆ setPin()

void DigitalSetter::setPin ( uint8_t  pin)

Set or change the output pin

Parameters
[in]pinThe Arduino pin to use for output

Referenced by DigitalSetter().


The documentation for this class was generated from the following files: