Pages: [1]   Go Down
Author Topic: Button on Digital Pin of Shift Register  (Read 266 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 23
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
pinMode(Q3 of register 4, INPUT);
if(Q3 of register 4 == HIGH) {
}

So how can i accomplish that ? Any idea ?
Thanks
Logged

0
Offline Offline
Shannon Member
****
Karma: 161
Posts: 10442
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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"...
Logged

[ I won't respond to messages, use the forum please ]

Offline Offline
Newbie
*
Karma: 0
Posts: 23
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 509
Posts: 31462
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 23
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ah ok, thanks for this information.
Logged

Pages: [1]   Go Up
Jump to: