The following code sends 5V to Q7 as desired. But the problem is that it stays High, how can I make it stay on for just n seconds only?
thanks
void loop() {
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, LSBFIRST, 1);
digitalWrite(latchPin, HIGH);
delay(3000);
}
First write code to turn off the pin and test it. Then see this tutorial ..
This will show you a good way to have something happen for x period of time.
Well I tried the following of No avail!?
void loop() {
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, LSBFIRST, 1);
digitalWrite(latchPin, HIGH);
delay(3000);
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, LSBFIRST, 0);
digitalWrite(latchPin, HIGH);
}
Wasn't that supposed to write Zero's to all the bits?
Isn't there a way of resetting the bits? I know pin 10 is Clear but don't know how to use it?
thanks for the help
Well my mistake! I should have added a " delay(3000);" after the last line of code. 