Go Down

Topic: Button on Digital Pin of Shift Register (Read 403 times) previous topic - next topic

dehlen

I got 4 Shift Registers. On Q3 of register number 4 i'd like to hook up a button and whenever the button is pressed I'd like to recognize it.
Code: [Select]

pinMode(Q3 of register 4, INPUT);
if(Q3 of register 4 == HIGH) {
}


So how can i accomplish that ? Any idea ?
Thanks

MarkT

There is a sticky topic at the top of this sub-forum describing how to get help on this forum - please read it.

Particularly see the list in the section "6. Getting help on the forum"...
[ I won't respond to messages, use the forum please ]

dehlen

Hm ok i thought everything should clear. But i try to describe it more in detail. I hooked up 4 shift registers like so: (example 2)
http://arduino.cc/en/Tutorial/ShiftOut.
I am using the shift registers to control 9 rgb less. For this i use the ShiftPWM Library. But this library is only for working with leds, so i cant use this library to get my button value (high or low). I hope its more understandable now ? Sorry but because i dont know how to program this i can't upload a little test sketch.

Grumpy_Mike

Quote
Hm ok i thought everything should clear.

No it was not.

The clue in in the name shift OUT.
With those shift registers you can only output stuff not input it.
If you want to input information you have to use a different type of shift register.
See the shift in tutorial.

dehlen


Go Up