I `m trying to use a joystic as a mouse but had some problems.

Well, first of all I want to let you know that Im just starting to use arduino and I bought a model UNO R3 to start with it. Im trying to use a joystick "YwRobot" as a mouse but when I looked for some tutorials I found out that my joystick has 9 pins on it, instead of the common 6 pins; it has three more: a VCC, a GND and a S-K. Here`s a picture of it so you can see it:

I dont really know what is that S-k for and I dont know if it may be of use for making it work as a mouse, can you give some advices about it?

Also I was looking for tutorials to make it work, but I found out that the joystick is supposed to have a pin that says SEL which is connected to a digital pin of the arduino, but mine doesn`t have that one, so I wonder which pin has to be connected to arduino to be able to codify it?

I really appreciate your help :slight_smile:

You will have trouble using a joystick as a mouse, because a mouse has one, two, or three buttons you can click, as well as moving it around.

I would start with what you know, instead of worrying too much about what you don't know.

See if you can read the position or movement from the x and y directions using the ardunio. If you don't know what s/k is, then don't use it.

Thank you so much for your advises :slight_smile:
Ill be sure not to use the pins I dont know and I`ll start with just making it move in x and y direction :slight_smile:

Thanks again, just one more question... do you know about the REL pin? thats something I need even to make it move and I really dont know what it means.

If your device doesn't have a SEL ( or REL ) pin, then you don't need to worry about. The tutorial where you saw that, was probably not the exact same device as yours.

Oh ok I wont be using it.

Thanks for all your help :slight_smile: I really appreciate it. I`ll try making it right away and see if it works.

I'm guessing the s-k pin is digital output from the press switch.

Interesting that that joystick has separate power for each axis.... I've never seen that before.

Oh you are right, it may be the press button.

By the way I could connect the joystick to my arduino and now every time I move it, it prints different numbers. Now I`m just wondering how to make it respond as a mouse, and watching some videos I found that people use c++ for that, but do you think I can use java(netbeans) instead of that?

The Uno does not have the USB interface to work as a mouse you need the Leonardo. Unless you are going to program a mouse driver that receives serial input.

Steel17:
Oh you are right, it may be the press button.

By the way I could connect the joystick to my arduino and now every time I move it, it prints different numbers. Now I`m just wondering how to make it respond as a mouse, and watching some videos I found that people use c++ for that, but do you think I can use java(netbeans) instead of that?

c++ is the way to go if you want to get a mouse driver working well. What is your OS?

oharkins:
The Uno does not have the USB interface to work as a mouse you need the Leonardo. Unless you are going to program a mouse driver that receives serial input.
http://arduino.cc/en/Main/ArduinoBoardLeonardo

Oh my that´s really sad, well maybe I can only make it work for simple things but not like a mouse, Ill be sure to look for easier projects because Im starting to use it...
Thanks for the advise. :slight_smile:

oharkins:

Steel17:
Oh you are right, it may be the press button.

By the way I could connect the joystick to my arduino and now every time I move it, it prints different numbers. Now I`m just wondering how to make it respond as a mouse, and watching some videos I found that people use c++ for that, but do you think I can use java(netbeans) instead of that?

c++ is the way to go if you want to get a mouse driver working well. What is your OS?

My OS is windows, for being more specific is windows 7 :slight_smile: