micro-ELC
Public Member Functions | Public Attributes | List of all members
LoadAdjustAnalogWrite Class Reference

load adjustor that uses analogWrite() to adjust a PWMable load More...

#include <LoadAdjustAnalogWrite.h>

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

Public Member Functions

 LoadAdjustAnalogWrite (byte _pin, bool _invert=false)
 load adjustor that uses analogWrite() to adjust a PWMable load More...
 
void setLoad (float load)
 set a new value for the adjustable load More...
 
void begin ()
 set up pin states More...
 
virtual void setLoad (float load)=0
 set a new value for the adjustable load More...
 
virtual void begin ()=0
 set up pin states More...
 

Public Attributes

byte pin
 
bool invert
 

Detailed Description

load adjustor that uses analogWrite() to adjust a PWMable load

Constructor & Destructor Documentation

◆ LoadAdjustAnalogWrite()

LoadAdjustAnalogWrite::LoadAdjustAnalogWrite ( byte  _pin,
bool  _invert = false 
)
inline

load adjustor that uses analogWrite() to adjust a PWMable load

Parameters
_pinPWM capable pin to output signal to
_invert(default false) set true if the load decreases as the duty cycle increses

Member Function Documentation

◆ begin()

void LoadAdjustAnalogWrite::begin ( )
inlinevirtual

set up pin states

Implements LoadAdjust.

◆ setLoad()

void LoadAdjustAnalogWrite::setLoad ( float  load)
inlinevirtual

set a new value for the adjustable load

Parameters
loadbetween 0.0 and 1.0 where 1.0 is the highest load

Implements LoadAdjust.

Member Data Documentation

◆ invert

bool LoadAdjustAnalogWrite::invert

◆ pin

byte LoadAdjustAnalogWrite::pin

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