Basic Joystick Question

I'm trying to use an 8-directional joystick in a project but I'm a little bit stuck. It's this one (

There are five wires coming out of the joystick, I believe that one is ground and the other four are switches (one for each direction). But unless there is a battery inside the joystick and I'm pretty sure there isn't, where does the power come from (so the input pin on my arduino will know when the switch has been activated)? It seems like all the wires are outputs so there is no power coming into the joystick that can form the circuit.

Right now when I plug it into the arduino I get no response or, at best, a kind of random response unrelated to which way the joystick is being moved. I'm brand new to the arduino so there's every possibility I'm missing something basic.

Please help!

Thanks, Jeff

It's just four switches with a common terminal, isn't it? So you would wire the common terminal to ground, wire each of the other switch terminals to a separate input and enable the Arduino's internal pull-up resistors on each input, then use digitalRead() on each input to find the state of the corresponding switch.

I would guess that 5v goes to the common pin and then you apply that to each of 4 Arduino pins when each switch is closed.

You would want to have each pin pulled low the rest of the time, so they don't float.

Seems to me it's just 4 of these.

But I may be wrong.....