The setPins function does not check if the readPin is defined when pinMode is called. On some boards this results in a lockup, when pinMode(-1, INPUT) is called.
void Shifty::setPins(int dataPin, int clockPin, int latchPin, int readPin) {
pinMode(dataPin, OUTPUT);
pinMode(clockPin, OUTPUT);
pinMode(latchPin, OUTPUT);
if(readPin != -1) {
pinMode(readPin, INPUT);
this->readPin = readPin;
}
this->dataPin = dataPin;
this->clockPin = clockPin;
this->latchPin = latchPin;
}
The setPins function does not check if the readPin is defined when pinMode is called. On some boards this results in a lockup, when pinMode(-1, INPUT) is called.
See:
Shifty/src/Shifty.cpp
Line 20 in 1fe332c
Possible solution: