-1

Joysticks usually have two outputs, one for the x-axis and one for the y-axis. Most of the bluetooth modules I have found only have one tx line.. Is there a way to set them up to use one bluetooth module to connect to arduino?

Im thinking of buying another but I'm wondering if anyone has a better idea than this, or if what I'm thinking is even possible.

Thanks!

  • What joystick? What bluetooth module? – Majenko Aug 18 '15 at 18:58
1

Unless you have a very special joystick and a very special bluetooth module you can't just connect a joystick to the TX pin of a bluetooth module.

Instead you have to have the joystick (I am assuming a 2D analog joystick) to a pair of analog inputs on (for instance) an Ardiuno, which then samples the analog values. It is then up to you to decide what you do with that sampled data - in your case you want to send it out via serial to the bluetooth module (I assume something like a HC-05 or HC-06). What that data is, and how you interpret it, is up to you.

You could send the data as plain text, such as:

512,512
512,512
384,512
229,512
83,512
83,938
82,1012

Each line specifies a pair of analog values and is terminated by a line-feed. The receiving end then needs to read each line, split it on the ,, and interpret the two values as X/Y readings.

That's quite inefficient, though, and there are better "binary" methods that use less bytes to send the readings, but that is more advanced.

0

So your joystick is sending bt signals?

If you can't find an appropiate data sheet to that i advise you link it with your pc, start hterm and analyse what exactly is sent.(requires to link the bt devices)

If your joystick is not able to out bt signals I'm not sure what you are trying to do there and need more info

PS: I already did the following: control a robot with your smartphone via bt

control a robot with an old ps2 joystick via cable

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.