#include "PortExpander74HC595.hpp"
Public Member Functions | |
byte | begin (int inID, int numberOfShiftRegisters, int serialDataPin, int clockPin, int latchPin) |
void | beginPin (int inPin, PIN_TYPE inType) |
void | digitalWrite (int inPin, int inValue) |
void | analogWrite (int inPin, int inValue) |
byte | GetPinsNumber () |
PortExpander74HC595 () | |
![]() | |
PortExpander () | |
Additional Inherited Members | |
![]() | |
static void | beginPin (int inPin, int inExpId, PIN_TYPE inType) |
static void | digitalWrite (int inPin, int inExpId, int inValue) |
static void | analogWrite (int inPin, int inExpId, int inValue) |
![]() | |
virtual byte | begin () |
![]() | |
static void | Add (PortExpander *inExpander) |
![]() | |
int | id |
This class describes a shift register 74HC595 as an expander: a circuit wich provides 8 pins per circuit, and which can be linked to another circuit to increase the number of output pins whitout increasing the number of pins of the Arduino used ! Each expander is identified by a number : the id. Only output pins are used in Accessories. This expander can only provide digital output.
Definition at line 15 of file PortExpander74HC595.hpp.
PortExpander74HC595::PortExpander74HC595 | ( | ) |
Default constructor.
|
virtual |
Set the value of one pin of the expander.
inPin | number of the pin. should be between 0 and the maximum number of expander pins. |
inValue | New analog value of the pin. Should be between 0 and 255. |
Implements PortExpander.
byte PortExpander74HC595::begin | ( | int | inID, |
int | numberOfShiftRegisters, | ||
int | serialDataPin, | ||
int | clockPin, | ||
int | latchPin | ||
) |
Initialize the instance of the expander.
inId | id of expander (to be used associated to pin). |
numberOfShiftRegisters | Number of linked modules. One is the minimum. |
serialDataPin | pin used to send serial data to the chip. |
clockPin | Shift register clock pin |
latchPin | Storage register clock pin (latch pin) |
|
virtual |
Initialize one pin of the expander.
inPin | number of the pin. should be between 0 and the maximum number of expander pins. |
inType | type of the output of this pin : only DIGITAL here. |
Implements PortExpander.
|
virtual |
Set the state of one pin of the expander.
inPin | number of the pin. should be between 0 and the maximum number of expander pins. |
inValue | New state of the pin. Should be HIGH (1) or LOW (0). |
Implements PortExpander.
|
inlinevirtual |
Gets the total number of pins.
Reimplemented from PortExpander.
Definition at line 50 of file PortExpander74HC595.hpp.