PBtnToggle
|
Controller class for PISO buttons. More...
#include <PBtnTogglePISOController.h>
Public Member Functions | |
PBtnTogglePISOController (int chips, int data_pin, int clock_pin, int latch_pin_) | |
Initialize PISO chip controller. More... | |
void | add (PBtnTogglePISO *btn) |
Add PBtnTogglePISO button to controller. More... | |
void | check () |
Check buttons state. More... | |
Controller class for PISO buttons.
All PBtnTogglePISO buttons will be add()-ed to this controller. PISO chips can be daisy chained. PL /active low/, CP, Q7 pins of first chip are wired to Arduino digital pins. All chips have common PL /active low/, CP, Vcc, CE /active low/, GND pins. Pin DS will be wired with pin Q7 of next chip.
PBtnTogglePISOController::PBtnTogglePISOController | ( | int | chips, |
int | data_pin, | ||
int | clock_pin, | ||
int | latch_pin | ||
) |
Initialize PISO chip controller.
chips | Number of chips daisy chained |
data_pin | pin number wired to chip Q7 (serial out) |
clock_pin | pin number wired to chip CP (clock input) |
latch_pin | pin number wired to PL /active low/ (parallel load input) |
void PBtnTogglePISOController::add | ( | PBtnTogglePISO * | btn | ) |
Add PBtnTogglePISO button to controller.
*btn | PBtnTogglePISO pointer |
void PBtnTogglePISOController::check | ( | ) |
Check buttons state.
This method must be called in loop()