igpay wrote:TurboSuper wrote:But are you planning on using it on 10 different barrels? Because otherwise, a single flip-flop will get the job done just fine.
I'm only using only two barrels for this project, so I guess I can use a flip-flop, if only I knew what a flip-flop was. I wikipedia'd it, but the definition wasn't really helpful. So if someone could tell me what a flip-flop does, and how to wire one up, maybe i can figure use one.
A flip-flop is esssentialy a memory device. A JK flip-flop, as the name implies, has J and K inputs. These are effectively set and reset respectively, however, they have an interesting 3rd property: When they are both set to high, the flip-flop operates in toggle mode. Therefore, every time you feed a clock pulse to it (your switch), the output will go from a 1 to a 0, or a 0 to a 1.
Flip-Flops also usually have the inverse of their output availiable (generally labeled Q and !Q), so that way, the output and it's inverse will alternate between 1 and 0 as they receive pulses in toggle-mode configuration.
I think from there, it should be pretty simple