1#ifndef LOAD_ADJUST_RELAY_PARALLEL_BINARY_H
2#define LOAD_ADJUST_RELAY_PARALLEL_BINARY_H
3#include "../LoadAdjust.h"
27 uint16_t setting = constrain(load, 0.0, 1.0) * ((1 << N) - 1);
This class defines an interface for any type of adjustable electrical load.
Definition: LoadAdjust.h:7
load adjustor that switches relays or other switches on and off in a binary pattern
Definition: LoadAdjustRelayParallelBinary.h:11
void setLoad(float load)
set a new value for the adjustable load
Definition: LoadAdjustRelayParallelBinary.h:25
void begin()
set up pin states
Definition: LoadAdjustRelayParallelBinary.h:33
RelaysDriver & driver
Definition: LoadAdjustRelayParallelBinary.h:13
LoadAdjustRelayParallelBinary(RelaysDriver &_relaysDriver, bool _activeRelaysIncreaseLoad=false)
load adjustor that switches relays or other switches on and off in a binary pattern
Definition: LoadAdjustRelayParallelBinary.h:20
bool activeRelaysIncreaseLoad
Definition: LoadAdjustRelayParallelBinary.h:14
This class defines an interface for any class that can control an array of relays.
Definition: RelaysDriver.h:8
virtual void begin()=0
this function should be called on startup. It sets up pinmodes.
virtual void set(uint16_t bits)=0
activate relays corresponding to a bit that's 1.